FrameworkElement.FocusVisualMargin Property
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 the outer margin of the focus visual for a FrameworkElement.
public:
property Thickness FocusVisualMargin { Thickness get(); void set(Thickness value); };
Thickness FocusVisualMargin();
void FocusVisualMargin(Thickness value);
public Thickness FocusVisualMargin { get; set; }
var thickness = frameworkElement.focusVisualMargin;
frameworkElement.focusVisualMargin = thickness;
Public Property FocusVisualMargin As Thickness
Provides margin values for the focus visual. The default is a Thickness with all properties (dimensions) equal to 0. A different runtime default is often provided by individual control templates.
Device family |
Windows 10 Anniversary Edition (introduced in 10.0.14393.0)
|
API contract |
Windows.Foundation.UniversalApiContract (introduced in v3.0)
|
<Button Content="Button"
FocusVisualMargin="-3"/>
A negative margin will push the border away from the center of the control, and a positive margin will move the border closer to the center of the control.
Non-integral values for margin values are technically permitted, but should typically be avoided.
HighVisibility and Reveal focus visuals are rendered with an outer (primary) and inner (secondary) border.
For more info, see High Visibility Focus Visuals and Reveal focus.
Product | Versions |
---|---|
WinRT | Build 14383, Build 15063, Build 16299, Build 17134, Build 17763, Build 18362, Build 19041, Build 20348, Build 22000, Build 22621, Build 26100 |