■ Button 엘리먼트 : Background 속성 사용하기
------------------------------------------------------------------------------------------------------------------------
▶ 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="Button 엘리먼트 : Background 속성 사용하기" FontFamily="나눔고딕코딩" FontSize="16"> <Grid> <Button HorizontalAlignment="Center" VerticalAlignment="Center" Width="100" Height="30" BorderBrush="Gray" BorderThickness="1" Foreground="DarkBlue"> 조회 <Button.Background> <LinearGradientBrush StartPoint="0.5 0" EndPoint="0.5 1"> <LinearGradientBrush.GradientStops> <GradientStop Offset="0.0" Color="LightBlue" /> <GradientStop Offset="1.0" Color="SlateBlue" /> </LinearGradientBrush.GradientStops> </LinearGradientBrush> </Button.Background> </Button> </Grid> </Window>
|
------------------------------------------------------------------------------------------------------------------------
'C# > WPF' 카테고리의 다른 글
[C#/WPF] Clipboard 클래스 : GetText 정적 메소드를 사용해 HTML 구하기 (0) | 2020.08.08 |
---|---|
[C#/WPF] UIElement 클래스 : DragEnter/GiveFeedback/DragOver/Drop/DragLeave 이벤트를 사용해 드래그하기 (0) | 2020.08.08 |
[C#/WPF] Thumb 엘리먼트 : DragStarted/DragDelta/DragCompleted 이벤트를 사용해 드래그 하기 (0) | 2020.08.08 |
[C#/WPF] Calendar 클래스 사용하기 (0) | 2020.08.08 |
[C#/WPF] Frame 클래스 : Navigate 메소드를 사용해 페이지 이동하기 (0) | 2020.08.08 |
[C#/WPF] Button 엘리먼트 : Background 속성 사용하기 (0) | 2020.08.08 |
[C#/WPF] BulletDecorator 엘리먼트 사용하기 (0) | 2020.08.08 |
[C#/WPF] DrawingVisual 클래스 사용하기 (0) | 2020.08.07 |
[C#/WPF] UIElement 엘리먼트 : Clip 속성 사용하기 (0) | 2020.08.07 |
[C#/WPF] DrawingContext 클래스 : PushClip 메소드를 사용해 클리핑 영역 설정하기 (0) | 2020.08.06 |
[C#/WPF] Storyboard 클래스 : 이미지 슬라이드 쇼 보여주기 (0) | 2020.08.06 |
댓글을 달아 주세요