첨부 실행 코드는 나눔고딕코딩 폰트를 사용합니다.
본 블로그는 광고를 포함하고 있습니다.
광고 클릭에서 발생하는 수익금은 모두 블로그 콘텐츠 향상을 위해 쓰여집니다.

728x90
반응형
728x170

TestProject.zip
다운로드

▶ MainWindow.xaml

<Window x:Class="TestProject.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Width="800"
    Height="600"
    Title="VisualBrush 엘리먼트 : 엘리먼트 반사 그림자 이미지 만들기"
    FontFamily="나눔고딕코딩"
    FontSize="16">
    <Window.Resources>
        <Style TargetType="{x:Type TextBlock}">
            <Setter Property="VerticalAlignment" Value="Bottom"             />
            <Setter Property="FontFamily"        Value="Lucida Calligraphy" />
            <Setter Property="FontSize"          Value="36"                 />
        </Style>
        <Style TargetType="{x:Type CheckBox}">
            <Setter Property="Margin"   Value="19" />
            <Setter Property="FontSize" Value="24" />
        </Style>
    </Window.Resources>
    <Grid>
        <StackPanel
            HorizontalAlignment="Center"
            VerticalAlignment="Center">
            <StackPanel Name="stackPanel"
                HorizontalAlignment="Center"
                Orientation="Horizontal">
                <TextBlock Text="Check..." />
                <StackPanel HorizontalAlignment="Center">
                    <CheckBox Content="CheckBox 1" />
                    <CheckBox Content="CheckBox 2" />
                    <CheckBox Content="CheckBox 3" />
                </StackPanel>
                <TextBlock Text="...Boxes" />
            </StackPanel>
            <StackPanel
                Height="{Binding ElementName=stackPanel, Path=ActualHeight}">
                <StackPanel.Background>
                    <VisualBrush
                        Visual="{Binding ElementName=stackPanel}"
                        Stretch="None">
                        <VisualBrush.RelativeTransform>
                            <TransformGroup>
                                <ScaleTransform
                                    ScaleX="1"
                                    ScaleY="-1" />
                                <TranslateTransform Y="1" />
                            </TransformGroup>
                        </VisualBrush.RelativeTransform>
                    </VisualBrush>
                </StackPanel.Background>
                <StackPanel.OpacityMask>
                    <LinearGradientBrush
                        StartPoint="0 0"
                        EndPoint="0 1">
                        <GradientStop Offset="0" Color="#80000000" />
                        <GradientStop Offset="1" Color="#00000000" />
                    </LinearGradientBrush>
                </StackPanel.OpacityMask>
            </StackPanel>
        </StackPanel>
    </Grid>
</Window>
728x90
반응형
그리드형
Posted by 사용자 icodebroker
TAG , , , ,

댓글을 달아 주세요