728x90
<Window x:Class="wpf04.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Button" Height="450" Width="600">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="0*" />
</Grid.ColumnDefinitions>
<!-- Button Background -->
<Button Height="26"
HorizontalAlignment="Left"
Margin="56,107,0,0"
Name="button1"
VerticalAlignment="Top"
Width="75"
Background="Red"
Content="Button" />
<Label Height="23.78"
HorizontalAlignment="Left"
Margin="162.88,109.22,0,0"
Name="Background"
VerticalAlignment="Top"
Width="79.12"
Content="Background" />
<!-- Button Foreground -->
<Button Height="26"
HorizontalAlignment="Right"
Margin="0,107,172,0"
VerticalAlignment="Top"
Width="75"
Foreground="Red"
Content="Button" />
<Label Height="23.78"
Margin="0,109.22,66,0"
VerticalAlignment="Top"
HorizontalAlignment="Right"
Width="79.12"
Content="Foreground" />
<!-- Button BorderBrush -->
<Button HorizontalAlignment="Left"
Margin="56,160,0,0"
Width="75"
BorderBrush="Yellow"
Height="26"
VerticalAlignment="Top"
Content="Button" />
<Label Margin="162.88,159.22,0,0"
Height="26.78"
VerticalAlignment="Top"
HorizontalAlignment="Left"
Width="79.12"
Content="BorderBrush" />
<!-- Button Content -->
<Button Content="Click Me"
Height="26"
HorizontalAlignment="Right"
VerticalAlignment="Top"
Width="75"
Margin="0,160,172,0" />
<Label Height="23.78"
Margin="0,159.22,66,0"
VerticalAlignment="Top"
HorizontalAlignment="Right"
Width="79.12"
Content="Content" />
<!-- Button FontWeight -->
<Button FontWeight="Thin"
HorizontalAlignment="Left"
Margin="59,0,0,116"
Width="72"
Height="26"
VerticalAlignment="Bottom"
Content=">Button" />
<Label Margin="162.88,0,0,176.22"
HorizontalAlignment="Left"
Width="79.12"
Content="FontWeight"
Height="23.78"
VerticalAlignment="Bottom" />
<!-- Button Cursor -->
<Button Cursor="Help"
HorizontalAlignment="Right"
Content="Cursor"
Margin="0,0,172,172.728333333333"
Width="75"
Height="26"
VerticalAlignment="Bottom" />
<Label Margin="0,0,66,172.728333333333"
HorizontalAlignment="Right"
Width="79.12" Content="Cursor"
Height="23.78"
VerticalAlignment="Bottom" />
<!-- Button FontSize -->
<Button Margin="59,0,0,174"
FontSize="15"
Content="Button"
Height="26"
HorizontalAlignment="Left"
VerticalAlignment="Bottom"
Width="72" />
<Label Margin="162.88,0,0,116"
HorizontalAlignment="Left"
Width="79.12"
Height="23.78"
VerticalAlignment="Bottom"
Content="FontSize" />
<!-- Button FontFamily -->
<Button FontFamily="verdana"
HorizontalAlignment="Right"
Margin="0,0,172,116"
Width="75"
Height="26"
VerticalAlignment="Bottom"
Content="Button" />
<Label Margin="0,0,66,116"
HorizontalAlignment="Right"
Width="79.12"
Height="23.78"
VerticalAlignment="Bottom"
Content="FontFamily" />
</Grid>
</Window>
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Button" Height="450" Width="600">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="0*" />
</Grid.ColumnDefinitions>
<!-- Button Background -->
<Button Height="26"
HorizontalAlignment="Left"
Margin="56,107,0,0"
Name="button1"
VerticalAlignment="Top"
Width="75"
Background="Red"
Content="Button" />
<Label Height="23.78"
HorizontalAlignment="Left"
Margin="162.88,109.22,0,0"
Name="Background"
VerticalAlignment="Top"
Width="79.12"
Content="Background" />
<!-- Button Foreground -->
<Button Height="26"
HorizontalAlignment="Right"
Margin="0,107,172,0"
VerticalAlignment="Top"
Width="75"
Foreground="Red"
Content="Button" />
<Label Height="23.78"
Margin="0,109.22,66,0"
VerticalAlignment="Top"
HorizontalAlignment="Right"
Width="79.12"
Content="Foreground" />
<!-- Button BorderBrush -->
<Button HorizontalAlignment="Left"
Margin="56,160,0,0"
Width="75"
BorderBrush="Yellow"
Height="26"
VerticalAlignment="Top"
Content="Button" />
<Label Margin="162.88,159.22,0,0"
Height="26.78"
VerticalAlignment="Top"
HorizontalAlignment="Left"
Width="79.12"
Content="BorderBrush" />
<!-- Button Content -->
<Button Content="Click Me"
Height="26"
HorizontalAlignment="Right"
VerticalAlignment="Top"
Width="75"
Margin="0,160,172,0" />
<Label Height="23.78"
Margin="0,159.22,66,0"
VerticalAlignment="Top"
HorizontalAlignment="Right"
Width="79.12"
Content="Content" />
<!-- Button FontWeight -->
<Button FontWeight="Thin"
HorizontalAlignment="Left"
Margin="59,0,0,116"
Width="72"
Height="26"
VerticalAlignment="Bottom"
Content=">Button" />
<Label Margin="162.88,0,0,176.22"
HorizontalAlignment="Left"
Width="79.12"
Content="FontWeight"
Height="23.78"
VerticalAlignment="Bottom" />
<!-- Button Cursor -->
<Button Cursor="Help"
HorizontalAlignment="Right"
Content="Cursor"
Margin="0,0,172,172.728333333333"
Width="75"
Height="26"
VerticalAlignment="Bottom" />
<Label Margin="0,0,66,172.728333333333"
HorizontalAlignment="Right"
Width="79.12" Content="Cursor"
Height="23.78"
VerticalAlignment="Bottom" />
<!-- Button FontSize -->
<Button Margin="59,0,0,174"
FontSize="15"
Content="Button"
Height="26"
HorizontalAlignment="Left"
VerticalAlignment="Bottom"
Width="72" />
<Label Margin="162.88,0,0,116"
HorizontalAlignment="Left"
Width="79.12"
Height="23.78"
VerticalAlignment="Bottom"
Content="FontSize" />
<!-- Button FontFamily -->
<Button FontFamily="verdana"
HorizontalAlignment="Right"
Margin="0,0,172,116"
Width="75"
Height="26"
VerticalAlignment="Bottom"
Content="Button" />
<Label Margin="0,0,66,116"
HorizontalAlignment="Right"
Width="79.12"
Height="23.78"
VerticalAlignment="Bottom"
Content="FontFamily" />
</Grid>
</Window>
xaml 코드는 따로 설명을 드리지 않아도 한번씩 따라해 보시면 이해할 수 있으리라 생각됩니다.
※ 테스트 환경
-----------------------------------------------------------------------------------------
운영체체 : Windows Vista Ultimate 32bit
개발툴 : Microsoft Visual C# Codename "Orcas"
-----------------------------------------------------------------------------------------
'.NET WPF' 카테고리의 다른 글
[Controls] 7. ContextMenus (6) | 2006.12.22 |
---|---|
[Controls] 6. ComboBox (0) | 2006.12.22 |
[Controls] 5. CheckBox (0) | 2006.12.22 |
[Controls] 3. 개요소개(2)- Markup Extensions (0) | 2006.12.22 |
[Controls] 3. 개요소개(2)- Markup Extensions (0) | 2006.12.22 |
[Controls] 2. 개요소개(1)- XAML 컨트롤 속성 적용 (0) | 2006.12.22 |
[Controls] 1. Hello WPF (4) | 2006.12.22 |
댓글