Share via

FrameworkElement.FocusVisualPrimaryBrush Property


Gets or sets the brush used to draw the outer border of a HighVisibility or Reveal focus visual for a FrameworkElement.

 property Brush ^ FocusVisualPrimaryBrush { Brush ^ get(); void set(Brush ^ value); };
Brush FocusVisualPrimaryBrush();

void FocusVisualPrimaryBrush(Brush value);
public Brush FocusVisualPrimaryBrush { get; set; }
var brush = frameworkElement.focusVisualPrimaryBrush;
frameworkElement.focusVisualPrimaryBrush = brush;
Public Property FocusVisualPrimaryBrush As Brush

Property Value

The brush used to draw the outer border of a HighVisibility focus visual.


<!-- Specify a color directly -->
<Button Content="Button"

<!-- Use theme resources -->
<Button Content="Button"
        FocusVisualPrimaryBrush="{ThemeResource SystemBaseHighColor}"
        FocusVisualSecondaryBrush="{ThemeResource SystemAccentColor}"/>


The default colors are dependent on the RequestedTheme. Typically, the outer (primary) color is solid black, or equivalent, and the inner (secondary) color is solid white, or equivalent.

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.

Applies to

See also