728x90
반응형
728x170
■ SolidColorBrush 엘리먼트를 사용하는 방법을 보여준다.
▶ 예제 코드 (XAML)
<Page
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Page.Resources>
<Style TargetType="{x:Type Rectangle}">
<Setter Property="Margin" Value="10" />
<Setter Property="Width" Value="150" />
<Setter Property="Height" Value="150" />
<Setter Property="Stroke" Value="Black" />
<Setter Property="StrokeThickness" Value="1" />
</Style>
</Page.Resources>
<StackPanel
Margin="10 10 10 10"
Orientation="Horizontal"
VerticalAlignment="Top">
<Rectangle>
<Rectangle.Fill>
<SolidColorBrush
Color="Blue"
Opacity="1.0" />
</Rectangle.Fill>
</Rectangle>
<Rectangle>
<Rectangle.Fill>
<SolidColorBrush
Color="Blue"
Opacity="0.8" />
</Rectangle.Fill>
</Rectangle>
<Rectangle>
<Rectangle.Fill>
<SolidColorBrush
Color="Blue"
Opacity="0.6" />
</Rectangle.Fill>
</Rectangle>
<Rectangle>
<Rectangle.Fill>
<SolidColorBrush
Color="Blue"
Opacity="0.4" />
</Rectangle.Fill>
</Rectangle>
<Rectangle>
<Rectangle.Fill>
<SolidColorBrush
Color="Blue"
Opacity="0.2" />
</Rectangle.Fill>
</Rectangle>
</StackPanel>
</Page>
728x90
반응형
그리드형(광고전용)
'C# > WPF' 카테고리의 다른 글
[C#/WPF] VisualBrush 엘리먼트 사용하기 (0) | 2014.01.26 |
---|---|
[C#/WPF] DrawingBrush 엘리먼트 사용하기 (0) | 2014.01.26 |
[C#/WPF] ImageBrush 엘리먼트 사용하기 (0) | 2014.01.26 |
[C#/WPF] RadialGradientBrush 엘리먼트 사용하기 (0) | 2014.01.26 |
[C#/WPF] LinearGradientBrush 엘리먼트 사용하기 (0) | 2014.01.26 |
[C#/WPF] BitmapSource 클래스 : 픽셀 정수 배열 구하기 (0) | 2014.01.26 |
[C#/WPF] BitmapSource 클래스 : 픽셀 바이트 배열 구하기 (0) | 2014.01.26 |
[C#/WPF] RenderTargetBitmap 클래스 : MediaPlayer 객체에서 비트맵 구하기 (0) | 2014.01.26 |
[C#/WPF] MediaPlayer 클래스 : 재생하기 (0) | 2014.01.26 |
[C#/WPF] MediaPlayer 클래스 : 비디오 크기 구하기 (0) | 2014.01.26 |
댓글을 달아 주세요