Microsoft Silverlight - SPLessons

Microsoft silverlight Templates

Home > Lesson > Chapter 3
SPLessons 5 Steps, 3 Clicks
5 Steps - 3 Clicks

Microsoft silverlight Templates

Silverlight Templates

shape Description

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

shape Description

The below steps describes the template features:

shape 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

shape Points

  • Silverlight Templates - Describes the visual presentation and comprehensive reviews.
  • Template Features - Describe the components and frame work in the presentation.