A Template characterise the visual presentation and comprehensive reviews of the management. For every handlers, there is a delinquency layout connected with it, which provides the presentation to that management.In WPF application,without much of a stretch make own layouts when you need to redo the visual appearance and visual behaviour of a control.
Template Features
Description
The below steps describes the template features:
The majority of the UI components contain a bit of presentations and in addition it also has manipulation such as behaviour and appearance exists in a button.
Mouse drift events or Click event are the strategies that are terminated in light of float and exists a delinquency presentation, that will be altered using template Control.
Examples
The below example describe the templates structures
[c]<UserControl x:Class = "ButtonTemplate.MainPage" xmlns = "http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x = "http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d = "http://schemas.microsoft.com/expression/blend/2008" xmlns:mc = "http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable = "d" d:DesignWidth = "640" d:DesignHeight = "480">
<Grid x:Name = "LayoutRoot" HorizontalAlignment = "Center" VerticalAlignment = "Center">
<Button Height = "100" Width = "100" Content = "Click!" HorizontalContentAlignment = "Left" Click = "button_Click">
<Button.Template>
<ControlTemplate TargetType = "Button">
<Grid>
<Ellipse Fill = "Gray" Stroke = "Black" StrokeThickness = "3" Margin = "-64,0,0,0" />
<ContentPresenter HorizontalAlignment = "{TemplateBinding HorizontalContentAlignment}" VerticalAlignment = "Center" Content = "{TemplateBinding Content}" />
</Grid>
</ControlTemplate>
</Button.Template>
</Button>
</Grid>
</UserControl> [/c]
The output of the above example will display like this
Summary
Points
Silverlight Templates - Describes the visual presentation and comprehensive reviews.
Template Features - Describe the components and frame work in the presentation.