Button in Silverlight

Creating button:

  <Button></Button>

Button with alignment:

<Button Content="Button" Width="200" Height="25" HorizontalAlignment="Left" VerticalAlignment="Top" ></Button>

Changing back ground color of button:

<Button Content="Button" Width="200" Height="25" HorizontalAlignment="Left" VerticalAlignment="Top" Background="red" ></Button>

Adding image as background to button:

                  <Button Name="btnTest1" Width="200" Height="25" HorizontalAlignment="Left" VerticalAlignment="Top" Background="red" >               
                    <Image x:Name="imgSls1" Source="thumbnailCAKKSCJQ.jpg" Width="30" Height="30" HorizontalAlignment="Left" />
            </Button>

Adding image and Text as background to button:

  <Button Name="btnTest" Background="White" Width="200" Height="25" HorizontalAlignment="Left" VerticalAlignment="Top"  >         
                <StackPanel>
                    <Image Name="imgSls" Source="thumbnail.jpg" Width="30" Height="30" HorizontalAlignment="Left" />
                    <TextBlock Name="tblPlay" Text="PLAY" FontWeight="Bold"/>
                </StackPanel>   

            </Button>

Ebook Download
View all
Learn
View all