エッセンシャルWPF:Windows Presentation Foundation (Programmer's SELECTION)
- 作者: Chris Anderson,星睦
- 出版社/メーカー: 翔泳社
- 発売日: 2007/10/31
- メディア: 大型本
- 購入: 6人 クリック: 128回
- この商品を含むブログ (32件) を見る
ボタンの中に絵を設定
Windows1.xaml
<Window x:Class="WpfGraphicButton.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1" Height="300" Width="300"> <Grid> <Button Height="40" Width="110"> <Button.Content> <StackPanel Orientation="Horizontal" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" > <Image Source="/WpfGraphicButton;component/test.bmp" Width="30"></Image> <TextBlock Text="実行する" VerticalAlignment="Center"/> </StackPanel> </Button.Content> </Button> </Grid> </Window>