첨부 소스 코드는 나눔고딕코딩 폰트를 사용합니다.
728x90
반응형
728x170

<ContentControl
    Width="100"
    Height="100"
    Content="Hello">
    <ContentControl.Style>
        <Style TargetType="{x:Type ContentControl}">
            <Setter Property="Background" Value="Red"   />
            <Setter Property="Foreground" Value="Green" />
            <Setter Property="FontSize"   Value="20"    />
            <Setter Property="FontWeight" Value="Bold"  />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type ContentControl}">
                        <Grid>
                            <Ellipse
                                Width="{TemplateBinding Width}"
                                Height="{TemplateBinding Width}"
                                Fill="{TemplateBinding Background}" />
                            <ContentPresenter
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center" />
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </ContentControl.Style>
</ContentControl>
728x90
반응형
그리드형(광고전용)
Posted by icodebroker

댓글을 달아 주세요