■ Sytle 클래스 : BasedOn 속성 사용하기

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

<Style x:Key="NormalStyleKey">

    <Setter Property="Control.FontSize"            Value="24"             />

    <Setter Property="Control.Foreground"          Value="Blue"           />

    <Setter Property="Control.HorizontalAlignment" Value="Center"         />

    <Setter Property="Control.Margin"              Value="24"             />

    <Setter Property="Control.Padding"             Value="20, 10, 20, 10" />

</Style>

<Style

    x:Key="HotButtonStyleKey"

    BasedOn="{StaticResource NormalStyleKey}">

    <Setter Property="Control.Foreground" Value="Red" />

</Style>

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

Posted by 사용자 icodebroker
TAG

댓글을 달아 주세요