■ x:Key 속성 : x:Static 태그 확장을 사용해 시스템 리소스 재정의 하기

----------------------------------------------------------------------------------------------------

<StackPanel>

    <StackPanel.Resources>

        <SolidColorBrush

            x:Key="{x:Static SystemColors.ActiveCaptionBrushKey}"

            Color="Red" />

    </StackPanel.Resources>

    <Button

        HorizontalAlignment="Center"

        VerticalAlignment="Center"

        Margin="24"

        Foreground="{DynamicResource {x:Static SystemColors.ActiveCaptionBrushKey}}">

        Button with Red text

    </Button>

</StackPanel>

----------------------------------------------------------------------------------------------------

Posted by 사용자 icodebroker
TAG