SystemColors.ControlDarkDarkColorKey Property
Gets the ResourceKey for the dark shadow Color of the highlight color of a three-dimensional display element.
Assembly: PresentationFramework (in PresentationFramework.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation
<object property="{DynamicResource {x:Static SystemColors.ControlDarkDarkColorKey}}"/>
XAML Values
Property Value
Type: System.Windows.ResourceKeyThe resource key for the dark shadow Color of a three-dimensional display element.
Use the ControlDarkDarkColorKey to create a dynamic reference to the dark shadow color of a three-dimensional display element. This dynamic reference will automatically update if the color is changed. To create a static reference that does not update automatically, use ControlDarkDarkColor.
To use a system color in a gradient, you use the <SystemColor>Color and <SystemColor>ColorKey static properties of the SystemColors class to obtain a reference to the color, where <SystemColor> is the name of the desired system color. Use the <SystemColor>ColorKey properties when you want to create a dynamic reference that updates automatically as the system theme changes. Otherwise, use the <SystemColor>Color properties.
The following example uses dynamic system color resources to create a gradient.
<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" WindowTitle="Dynamic System Colors Example" Background="White"> <StackPanel Margin="20"> <!-- Uses dynamic references to system colors to set the colors of gradient stops. If these system colors change while this application is running, the gradient will be updated automatically. --> <Button Content="Hello, World!"> <Button.Background> <LinearGradientBrush> <LinearGradientBrush.GradientStops> <GradientStop Offset="0.0" Color="{DynamicResource {x:Static SystemColors.DesktopColorKey}}" /> <GradientStop Offset="1.0" Color="{DynamicResource {x:Static SystemColors.ControlLightLightColorKey}}" /> </LinearGradientBrush.GradientStops> </LinearGradientBrush> </Button.Background> </Button> </StackPanel> </Page>
The next example uses static system color resources to create a gradient.
<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" WindowTitle="Static System Colors Example" Background="White"> <StackPanel Margin="20"> <!-- Uses static references to system colors to set the colors of gradient stops. If these system colors change while this application is running, this button will not be updated until the page is loaded again. --> <Button Content="Hello, World!"> <Button.Background> <LinearGradientBrush> <LinearGradientBrush.GradientStops> <GradientStop Offset="0.0" Color="{x:Static SystemColors.DesktopColor}" /> <GradientStop Offset="1.0" Color="{x:Static SystemColors.ControlLightLightColor}" /> </LinearGradientBrush.GradientStops> </LinearGradientBrush> </Button.Background> </Button> </StackPanel> </Page>
This example is part of larger sample; for the complete sample, see the System Brushes and Colors Sample.
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.