728x90
반응형
728x170
■ DrawingBrush 엘리먼트의 GeometryDrawing 객체를 사용해 격자 배경 브러시를 만드는 방법을 보여준다.
▶ 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="DrawingBrush 엘리먼트 : GeometryDrawing 객체를 사용해 격자 배경 브러시 만들기"
FontFamily="나눔고딕코딩"
FontSize="16">
<Ellipse
HorizontalAlignment="Center"
VerticalAlignment="Center"
Width="300"
Height="300"
Stroke="DarkGray"
StrokeThickness="1">
<Ellipse.Fill>
<DrawingBrush
Viewport="0 0 10 10"
ViewportUnits="Absolute"
TileMode="Tile">
<DrawingBrush.Drawing>
<DrawingGroup>
<DrawingGroup.Children>
<GeometryDrawing
Brush="#66ccccff"
Geometry="M 0 0 L 1 0 1 0.1 0 0.1 Z" />
<GeometryDrawing
Brush="#66ccccff"
Geometry="M 0 0 L 0 1 0.1 1 0.1 0 Z" />
</DrawingGroup.Children>
</DrawingGroup>
</DrawingBrush.Drawing>
</DrawingBrush>
</Ellipse.Fill>
</Ellipse>
</Window>
728x90
반응형
그리드형(광고전용)
'C# > WPF' 카테고리의 다른 글
[C#/WPF] CTRL+X 키 입력 처리하기 (0) | 2016.01.24 |
---|---|
[C#/WPF] Point 클래스 : WinForm Screen 구하기 (0) | 2016.01.20 |
[C#/WPF] Window 클래스 : 스크린 구하기 (0) | 2016.01.20 |
[C#/WPF] Window 클래스 : 윈도우 테두리 제거하기 (0) | 2016.01.20 |
[C#/WPF] JpegBitmapEncoder 클래스 : JPEG 파일 저장하기 (0) | 2015.12.27 |
[C#/WPF] RichTextBox 클래스 : 문서 생성하기 (0) | 2015.12.22 |
[C#/WPF] RichTextBox 클래스 : 텍스트 구하기 (0) | 2015.12.22 |
[C#/WPF] RichTextBox 엘리먼트 : 문단 간격 줄이기 (0) | 2015.12.22 |
[C#/WPF] RichTextBox 클래스 : RTF 설정하기 (0) | 2015.12.22 |
[C#/WPF] RichTextBox 클래스 : 특정 포맷 문자열 구하기 (0) | 2015.12.22 |
댓글을 달아 주세요