Mega Code Archive

 
Categories / VB.Net Tutorial / WPF
 

Adding graphics to a Button

<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"       xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"       HorizontalAlignment="Center" VerticalAlignment="Center">     <Button>       <StackPanel Orientation="Horizontal">         <Canvas Width="20" Height="18" VerticalAlignment="Center">           <Ellipse Canvas.Left="1" Canvas.Top="1" Width="16" Height="16"                    Fill="Yellow" Stroke="Black" />         </Canvas>         <TextBlock VerticalAlignment="Center">Click!</TextBlock>       </StackPanel>     </Button> </Page>