Posted by: Zeeshan Amjad | August 29, 2009

Getting Started Template in WPF


In WPF every control has two important but distinct feature i.e. its appearance (how it looks like on the screen) and its behavior (how it interact with users). In WPF all templates are inherited by one abstract class names FrameworkTemplate. Here is a class diagram of FrameworkTemplate with its members.

Template_01

WPF already provide few template classes inherited by this class. These classes are ControlTemplate, DataTemplate and ItemsPanelTemplate. Here is a partial class hierarchy of template.

Template_02

Control template is a property of Control class. It means it can be use with any class inherited by Control class. This relationship can be represented by the following diagram.

Template_03

Similarly ItemsPanelTemplate is going to be used with ItemControl class. It is used to specify the visual appearance of multiple items in ItemControl such as ListBox, ComboBox, StatusBar etc. Here is a class diagram of ItemsPanelTemplate.

Template_04

All other templates are type of Data template. There is one specific type of data template name HierarchicalDataTemplate. This data template is going to be used with HeaderedItemsControl.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: