Pivot.HeaderFocusVisualPlacement Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets a value that specifies the style of focus visual used for pivot header items.
public:
property PivotHeaderFocusVisualPlacement HeaderFocusVisualPlacement { PivotHeaderFocusVisualPlacement get(); void set(PivotHeaderFocusVisualPlacement value); };
PivotHeaderFocusVisualPlacement HeaderFocusVisualPlacement();
void HeaderFocusVisualPlacement(PivotHeaderFocusVisualPlacement value);
public PivotHeaderFocusVisualPlacement HeaderFocusVisualPlacement { get; set; }
var pivotHeaderFocusVisualPlacement = pivot.headerFocusVisualPlacement;
pivot.headerFocusVisualPlacement = pivotHeaderFocusVisualPlacement;
Public Property HeaderFocusVisualPlacement As PivotHeaderFocusVisualPlacement
<Pivot HeaderFocusVisualPlacement="pivotHeaderFocusVisualPlacementMemberName" />
Property Value
A value of the enumeration that specifies the style of focus visual used for pivot header items. The default is SelectedItemHeader.
Remarks
Use this property to specify how the focus visual is drawn around the Pivot header.
Version compatibility
The HeaderFocusVisualPlacement property is not available prior to Windows 10, version 1607. If your app’s 'minimum platform version' setting in Microsoft Visual Studio is less than the 'introduced version' shown in the Requirements block later in this page, you must design and test your app to account for this. For more info, see Version adaptive code.
To avoid exceptions when your app runs on previous versions of Windows 10, do not set this property in XAML or use it without performing a runtime check. This example shows how to use the ApiInformation class to check for the presence of this property before you set it.
<Pivot x:Name="pivot1" Loaded="Pivot_Loaded">
...
</Pivot>
private void Pivot_Loaded(object sender, RoutedEventArgs e)
{
if (ApiInformation.IsPropertyPresent("Windows.UI.Xaml.Controls.Pivot", "HeaderFocusVisualPlacement"))
{
pivot1.HeaderFocusVisualPlacement = PivotHeaderFocusVisualPlacement.SelectedItemHeader;
}
}