道路標識の「駐停車禁止」っぽいボタンを作ってみた。
Grid部分をTemplate化すれば、いろんなところで使えるかも。
ボタンのサイズは17×17と小さ目を考えているので、大きくして使う人はStrokeThicknessプロパティを大きくする必要があります。
さらに、縦横比1:1という制限つき(^~^)
使えないか。。。。?
<Button Name="Button2" Height="17" Width="17">
<Button.Template>
<ControlTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="20*" />
<ColumnDefinition Width="100*" />
<ColumnDefinition Width="20*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="20*" />
<RowDefinition Height="100*" />
<RowDefinition Height="20*" />
</Grid.RowDefinitions>
<Ellipse Grid.ColumnSpan="3" Grid.Column="0"
Grid.RowSpan="3" Grid.Row="0"
Stroke="Red" StrokeThickness="3"
Fill="Blue" />
<Line Grid.Column="1" Grid.Row="1"
X1="0" Y1="0" X2="20" Y2="20"
Stroke="Red" StrokeThickness="3"
Stretch="Uniform"></Line>
<Line Grid.Column="1" Grid.Row="1"
X1="0" Y1="20" X2="20" Y2="0"
Stroke="Red" StrokeThickness="3"
Stretch="Uniform"></Line>
</Grid>
</ControlTemplate>
</Button.Template>
</Button>
最終更新:2009年04月27日 16:44