■ StaticResource 태그 확장 사용하기

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

<StackPanel

    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

    xmlns:s="clr-namespace:System;assembly=mscorlib">

    <StackPanel.Resources>

        <s:Double x:Key="FontSizeKey">

            20

        </s:Double>

    </StackPanel.Resources>

    <Button

        HorizontalAlignment="Center"

        VerticalAlignment="Center"

        Margin="10"

        FontSize="{StaticResource FontSizeKey}">

        테스트

    </Button>

</StackPanel>

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

Posted by 사용자 icodebroker
TAG

댓글을 달아 주세요