In this article let us learn how to use Control Template for a button control in a Silverlight application. Control Template will allow us to use, a control as a template to another control.
As usual, open visual studio and select Silverlight project. We can notice that there is a Grid layout in our MainPage.xaml. Remove the default Grid layout and just drag and drop the Stack panel Layout into our application. The code for this looks like as
<StackPanel x:Name="LayoutRoot" Background="White" >
</StackPanel>
We shall define a Control Template as a resource and we will use it for our button control. The code for stack panel resource looks like as
Read more: Source
No comments:
Post a Comment