<StackPanel xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Background="{DynamicResource {x:Static SystemColors.InactiveCaptionBrushKey}}"> <StackPanel.Resources> <LinearGradientBrush x:Key="dynabrush1" StartPoint="0 0" EndPoint="1 1"> <LinearGradientBrush.GradientStops> <GradientStop Offset="0" Color="{DynamicResource {x:Static SystemColors.ActiveCaptionColorKey}}" /> <GradientStop Offset="1" Color="{DynamicResource {x:Static SystemColors.InactiveCaptionColorKey}}" /> </LinearGradientBrush.GradientStops> </LinearGradientBrush> <SolidColorBrush x:Key="dynabrush2" Color="{DynamicResource {x:Static SystemColors.ActiveCaptionColorKey}}" /> </StackPanel.Resources> <Label HorizontalAlignment="Center" FontSize="96" Content="Dynamic Resources" Background="{StaticResource dynabrush1}" Foreground="{StaticResource dynabrush2}" /> </StackPanel>