728x90
BulletDecorator는 여러개의 다른 형태의 컨트롤을 그룹화 해서 묶는 컨트롤입니다. Image, TextBlock Control을 이용하여 다른 타입의 컨트롤을 만들어보겠습니다.
두번째 예제는 Image, TextBlock, CheckBox, RadioButton, Button Control을 이용하여 다른 타입의 컨트롤을 만듭니다.
그림 2.예제2
그림 1.예제1
<Window x:Class="wpf25.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="BulletDecorator" Height="450" Width="600">
<Grid>
<BulletDecorator Grid.Row="1" Grid.Column="0" Margin="0,5,0,0"
VerticalAlignment="Center" Background="Yellow">
<BulletDecorator.Bullet>
<Image Source="image\678033_1180870253.jpg"/>
</BulletDecorator.Bullet>
<TextBlock
Width="200"
TextWrapping="Wrap"
HorizontalAlignment="Left"
Foreground ="Purple">
안녕하세요 taedi
입니다.. 지금 보시는
지도는 유럽입니다.
</TextBlock>
</BulletDecorator>
</Grid>
</Window>
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="BulletDecorator" Height="450" Width="600">
<Grid>
<BulletDecorator Grid.Row="1" Grid.Column="0" Margin="0,5,0,0"
VerticalAlignment="Center" Background="Yellow">
<BulletDecorator.Bullet>
<Image Source="image\678033_1180870253.jpg"/>
</BulletDecorator.Bullet>
<TextBlock
Width="200"
TextWrapping="Wrap"
HorizontalAlignment="Left"
Foreground ="Purple">
안녕하세요 taedi
입니다.. 지금 보시는
지도는 유럽입니다.
</TextBlock>
</BulletDecorator>
</Grid>
</Window>
두번째 예제는 Image, TextBlock, CheckBox, RadioButton, Button Control을 이용하여 다른 타입의 컨트롤을 만듭니다.
그림 2.예제2
<Window x:Class="wpf25_1.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Window1" Height="450" Width="600">
<Grid>
<BulletDecorator Margin="55,55,100,100" Background="Cornsilk">
<BulletDecorator.Bullet>
<CheckBox/>
</BulletDecorator.Bullet>
<TextBlock Width="300" TextWrapping="Wrap"
HorizontalAlignment="Left" Foreground = "Blue"
Margin="25,0,0,0">CheckBox Bullet.</TextBlock>
</BulletDecorator>
<BulletDecorator Margin="55,75,0,0">
<BulletDecorator.Bullet>
<TextBox Width="20"/>
</BulletDecorator.Bullet>
<TextBlock Width="300" TextWrapping="Wrap"
HorizontalAlignment="Left" Foreground ="Blue"
Margin="25,0,0,0">TextBox Bullet. </TextBlock>
</BulletDecorator>
<BulletDecorator Margin="55,95,0,0">
<BulletDecorator.Bullet>
<RadioButton/>
</BulletDecorator.Bullet>
<TextBlock Width="300" TextWrapping="Wrap"
HorizontalAlignment="Left" Foreground ="Blue"
Margin="25,0,0,0"> RadioButton Bullet </TextBlock>
</BulletDecorator>
<BulletDecorator Margin="55,115,0,0">
<BulletDecorator.Bullet>
<Image Source="arrow_01.gif" Width="22" Height="22"/>
</BulletDecorator.Bullet>
<TextBlock Width="300" TextWrapping="Wrap"
HorizontalAlignment="Left" Foreground = "Blue"
Margin="25,0,0,0">Image Bullet.</TextBlock>
</BulletDecorator>
<BulletDecorator Margin="55,145,0,0">
<BulletDecorator.Bullet>
<Button Width="30" Height="20">B</Button>
</BulletDecorator.Bullet>
<TextBlock Width="300" TextWrapping="Wrap"
HorizontalAlignment="Left" Foreground = "Blue"
Margin="25,0,0,0">Button Bullet.</TextBlock>
</BulletDecorator>
<Label Height="29.2766666666667" Margin="94.37,5.72333333333333,117,0"
Name="label1" VerticalAlignment="Top" FontSize="16" FontWeight="Bold"
Content="BulletDecorter" />
</Grid>
</Window>
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Window1" Height="450" Width="600">
<Grid>
<BulletDecorator Margin="55,55,100,100" Background="Cornsilk">
<BulletDecorator.Bullet>
<CheckBox/>
</BulletDecorator.Bullet>
<TextBlock Width="300" TextWrapping="Wrap"
HorizontalAlignment="Left" Foreground = "Blue"
Margin="25,0,0,0">CheckBox Bullet.</TextBlock>
</BulletDecorator>
<BulletDecorator Margin="55,75,0,0">
<BulletDecorator.Bullet>
<TextBox Width="20"/>
</BulletDecorator.Bullet>
<TextBlock Width="300" TextWrapping="Wrap"
HorizontalAlignment="Left" Foreground ="Blue"
Margin="25,0,0,0">TextBox Bullet. </TextBlock>
</BulletDecorator>
<BulletDecorator Margin="55,95,0,0">
<BulletDecorator.Bullet>
<RadioButton/>
</BulletDecorator.Bullet>
<TextBlock Width="300" TextWrapping="Wrap"
HorizontalAlignment="Left" Foreground ="Blue"
Margin="25,0,0,0"> RadioButton Bullet </TextBlock>
</BulletDecorator>
<BulletDecorator Margin="55,115,0,0">
<BulletDecorator.Bullet>
<Image Source="arrow_01.gif" Width="22" Height="22"/>
</BulletDecorator.Bullet>
<TextBlock Width="300" TextWrapping="Wrap"
HorizontalAlignment="Left" Foreground = "Blue"
Margin="25,0,0,0">Image Bullet.</TextBlock>
</BulletDecorator>
<BulletDecorator Margin="55,145,0,0">
<BulletDecorator.Bullet>
<Button Width="30" Height="20">B</Button>
</BulletDecorator.Bullet>
<TextBlock Width="300" TextWrapping="Wrap"
HorizontalAlignment="Left" Foreground = "Blue"
Margin="25,0,0,0">Button Bullet.</TextBlock>
</BulletDecorator>
<Label Height="29.2766666666667" Margin="94.37,5.72333333333333,117,0"
Name="label1" VerticalAlignment="Top" FontSize="16" FontWeight="Bold"
Content="BulletDecorter" />
</Grid>
</Window>
※ 테스트 환경
-----------------------------------------------------------------------------------------
운영체체 : Windows Vista Ultimate 32bit
개발툴 : Microsoft Visual C# Codename "Orcas"
-----------------------------------------------------------------------------------------
'.NET WPF' 카테고리의 다른 글
실행주기(PageCycle) (0) | 2007.08.14 |
---|---|
[XPS] Fxied Documents (0) | 2007.08.10 |
[XPS] View and Generate XPS (0) | 2007.08.10 |
Path를 이용한 한글폰트 만들기 (0) | 2007.08.09 |
Silverlight 1.1 설치환경 (0) | 2007.07.19 |
Slideshow (0) | 2007.07.18 |
[Controls] 24. Element:Shape (Path - 2) (0) | 2007.02.01 |
댓글