<Window.Resources>
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Turquoise"></SolidColorBrush>
</Window.Resources>
/// <summary>
/// Gets the <see cref="T:System.Windows.ResourceKey"/> for the <see cref="T:System.Windows.Media.SolidColorBrush"/> that paints the background of selected items.
/// </summary>
///
/// <returns>
/// The resource key for the <see cref="T:System.Windows.Media.SolidColorBrush"/> that paints the background of selected items. This brush's <see cref="P:System.Windows.Freezable.IsFrozen"/> property is true, so it cannot be modified.
/// </returns>
public static ResourceKey HighlightBrushKey
{
get
{
if (SystemColors._cacheHighlightBrush == null)
SystemColors._cacheHighlightBrush = SystemColors.CreateInstance(SystemResourceKeyID.HighlightBrush);
return (ResourceKey) SystemColors._cacheHighlightBrush;
}
}
/// <summary>
/// Gets the <see cref="T:System.Windows.ResourceKey"/> for the <see cref="T:System.Windows.Media.SolidColorBrush"/> that paints the text of selected items.
/// </summary>
///
/// <returns>
/// The resource key for the <see cref="T:System.Windows.Media.SolidColorBrush"/> that paints the text of selected items. This brush's <see cref="P:System.Windows.Freezable.IsFrozen"/> property is true, so it cannot be modified.
/// </returns>
public static ResourceKey HighlightTextBrushKey
{
get
{
if (SystemColors._cacheHighlightTextBrush == null)
SystemColors._cacheHighlightTextBrush = SystemColors.CreateInstance(SystemResourceKeyID.HighlightTextBrush);
return (ResourceKey) SystemColors._cacheHighlightTextBrush;
}
}