OSDN Git Service

ボタンにアイコンを付けてみた
authorazyobuzin <azyobuzin@users.sourceforge.jp>
Thu, 12 May 2011 07:57:06 +0000 (16:57 +0900)
committerazyobuzin <azyobuzin@users.sourceforge.jp>
Thu, 12 May 2011 07:57:06 +0000 (16:57 +0900)
HatenaDiaryClient/HatenaDiaryClient.csproj
HatenaDiaryClient/Images/Send Document.png [new file with mode: 0644]
HatenaDiaryClient/Views/MainWindow.xaml

index ce9df44..cb3a3e6 100644 (file)
     <AppDesigner Include="Properties\" />
   </ItemGroup>
   <ItemGroup>
+    <Resource Include="Images\Send Document.png" />
     <Content Include="InfrastructureAssemblies\Design\Livet.Design.dll" />
     <Content Include="InfrastructureAssemblies\Design\Livet.Expression.Design.dll" />
     <Content Include="InfrastructureAssemblies\Livet.dll" />
diff --git a/HatenaDiaryClient/Images/Send Document.png b/HatenaDiaryClient/Images/Send Document.png
new file mode 100644 (file)
index 0000000..8700acf
Binary files /dev/null and b/HatenaDiaryClient/Images/Send Document.png differ
index caf4dcc..72ea60c 100644 (file)
         </Menu>
         
         <StackPanel Grid.Row="1" Orientation="Horizontal" Background="LightSteelBlue">
-            <Button Content="投稿" Width="50" Height="40"/>
+            <StackPanel.Resources>
+                <Style TargetType="Image">
+                    <Setter Property="HorizontalAlignment" Value="Center"/>
+                    <Setter Property="Width" Value="32"/>
+                    <Setter Property="Height" Value="32"/>
+                </Style>
+                <Style TargetType="TextBlock">
+                    <Setter Property="HorizontalAlignment" Value="Center"/>
+                </Style>
+                <Style TargetType="Button">
+                    <Setter Property="Width" Value="50"/>
+                </Style>
+            </StackPanel.Resources>
+            
+            <Button>
+                <StackPanel>
+                    <Image Source="/HatenaDiaryClient;component/Images/Send%20Document.png" />
+                    <TextBlock Text="投稿"/>
+                </StackPanel>
+            </Button>
         </StackPanel>
         
         <Grid Grid.Row="2" Background="LightBlue">