Inserting an Image and Label to a Button in WPF

In this blog i will show how to insert an image and a label to a button in WPF.

I any WPF application we normally observe a button with rich content.We can make button looks so rich using its child elements such as Image,Label,Stack Panel.The snapshot will give any idea how a rich content button looks in below snapshot.

bb.bmp
Xaml Code For Above Button:

<Button Height="37" HorizontalAlignment="Left" Margin="222,72,0,0" Name="button1" >

  <StackPanel Orientation="Horizontal">

    <Image Source="delete.jpg" Height="20" Width="27" />

    <Label Padding="4" Height="27" Width="55" FontWeight="Bold" FontFamily="Times New Roman>

Delete"</Label>

  </StackPanel>

</Button>