C# Class Yuhan.WPF.Helpers.DynamicTemplateSelector

Provides a means to specify DataTemplates to be selected from within WPF code
Inheritance: System.Windows.Controls.DataTemplateSelector
Datei anzeigen Open project: hansuky/Yuhan

Public Properties

Property Type Description
TemplatesProperty System.Windows.DependencyProperty

Public Methods

Method Description
GetTemplates ( UIElement element ) : Yuhan.WPF.Helpers.Template[]

Gets the value of the element's attached TemplatesProperty

SelectTemplate ( object item, System container ) : System.Windows.DataTemplate

Overriden base method to allow the selection of the correct DataTemplate

SetTemplates ( UIElement element, Template value ) : void

Sets the value of the element's attached TemplatesProperty

Method Details

GetTemplates() public static method

Gets the value of the element's attached TemplatesProperty
public static GetTemplates ( UIElement element ) : Yuhan.WPF.Helpers.Template[]
element UIElement The who's attached template's property you wish to retrieve
return Yuhan.WPF.Helpers.Template[]

SelectTemplate() public method

Overriden base method to allow the selection of the correct DataTemplate
public SelectTemplate ( object item, System container ) : System.Windows.DataTemplate
item object The item for which the template should be retrieved
container System The object containing the current item
return System.Windows.DataTemplate

SetTemplates() public static method

Sets the value of the element's attached TemplatesProperty
public static SetTemplates ( UIElement element, Template value ) : void
element UIElement The for which the attached property's value will be set
value Template The array of objects to be used by the given
return void

Property Details

TemplatesProperty public_oe static_oe property

Generic attached property specifying Templates used by the DynamicTemplateSelector
This attached property will allow you to set the templates you wish to be available whenever a control's TemplateSelector is set to an instance of DynamicTemplateSelector
public static DependencyProperty,System.Windows TemplatesProperty
return System.Windows.DependencyProperty