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

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"
    xmlns:s="clr-namespace:System;assembly=mscorlib"
    Width="800"
    Height="600"
    Title="ScaleTransform 엘리먼트 : 좌우대칭 반사 텍스트 만들기"
    FontFamily="나눔고딕코딩"
    FontSize="16">
    <Canvas>
        <Canvas.Resources>
            <FontFamily x:Key="FontFamilyKey">Times New Roman</FontFamily>
            <s:Double x:Key="FontSizeDoubleKey">96</s:Double>
            <TransformGroup x:Key="TransformGroupKey">
                <ScaleTransform ScaleX="{Binding Source={StaticResource FontFamilyKey}, Path=Baseline}" />
                <ScaleTransform ScaleX="{StaticResource FontSizeDoubleKey}" />
            </TransformGroup>
            <Style TargetType="{x:Type TextBlock}">
                <Setter Property="FontFamily"  Value="{StaticResource FontFamilyKey}"     />
                <Setter Property="FontSize"    Value="{StaticResource FontSizeDoubleKey}" />
                <Setter Property="Text"        Value="Reflect" />
                <Setter Property="Canvas.Left" Value="384"     />
                <Setter Property="Canvas.Top"  Value="48"      />
            </Style>
        </Canvas.Resources>
        <TextBlock />
        <TextBlock>
            <TextBlock.RenderTransform>
                <ScaleTransform ScaleX="-1" />
            </TextBlock.RenderTransform>
        </TextBlock>
        <TextBlock>
            <TextBlock.RenderTransform>
                <ScaleTransform
                    ScaleY="-1"
                    CenterY="{Binding Source={StaticResource TransformGroupKey}, Path=Value.M11}" />
            </TextBlock.RenderTransform>
        </TextBlock>
        <TextBlock>
            <TextBlock.RenderTransform>
                <ScaleTransform
                    ScaleX="-1"
                    ScaleY="-1"
                    CenterY="{Binding Source={StaticResource TransformGroupKey}, Path=Value.M11}" />
            </TextBlock.RenderTransform>
        </TextBlock>
    </Canvas>
</Window>
728x90
반응형
그리드형(광고전용)
Posted by icodebroker

댓글을 달아 주세요