첨부 실행 코드는 나눔고딕코딩 폰트를 사용합니다.
------------------------------------------------------------------------------------------------------------------------------------------------------
728x90
728x170

■ Rectangle 엘리먼트를 사용해 젤(Gel) 버튼을 만드는 방법을 보여준다.

TestProject.zip
0.01MB

▶ 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="Rectangle 엘리먼트 : 젤(Gel) 버튼 만들기"
    FontFamily="나눔고딕코딩"
    FontSize="16">
    <Grid
        HorizontalAlignment="Center"
        VerticalAlignment="Center"
        Background="White">
        <Rectangle
            Margin="2 2 0 0 "
            Fill="#80000000"
            Width="200"
            Height="50"
            RadiusX="15"
            RadiusY="15">
            <Rectangle.BitmapEffect>
                <BlurBitmapEffect Radius="10" />
            </Rectangle.BitmapEffect>
        </Rectangle>
        <Rectangle
            Width="200"
            Height="50"
            RadiusX="15"
            RadiusY="15">
            <Rectangle.Fill>
                <LinearGradientBrush
                    StartPoint="0 0"
                    EndPoint="0 1">
                    <GradientStop Offset="0" Color="#006700" />
                    <GradientStop Offset="1" Color="#00ef00" />
                </LinearGradientBrush>
            </Rectangle.Fill>
        </Rectangle>
        <Rectangle
            Margin="1 1 0 0 "
            Width="198"
            Height="48"
            RadiusX="14"
            RadiusY="14">
            <Rectangle.Fill>
                <LinearGradientBrush
                    StartPoint="0 0"
                    EndPoint="0 1">
                    <GradientStop Offset="0" Color="#ffffffff" />
                    <GradientStop Offset="1" Color="#00000000" />
                </LinearGradientBrush>
            </Rectangle.Fill>
        </Rectangle>
    </Grid>
</Window>
728x90
그리드형(광고전용)
Posted by icodebroker
,