Class TemplateGenerator
Class that helps the creation of control and data templates by using delegates.
Inheritance
System.Object
TemplateGenerator
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Simplic.UI
Assembly: Simplic.UI.dll
Syntax
public static class TemplateGenerator
Methods
| Improve this Doc View SourceCreateControlTemplate(Type, Func<Object>)
Creates a control-template that uses the given delegate to create new instances.
Declaration
public static ControlTemplate CreateControlTemplate(Type controlType, Func<object> factory)
Parameters
Type | Name | Description |
---|---|---|
System.Type | controlType | |
System.Func<System.Object> | factory |
Returns
Type | Description |
---|---|
System.Windows.Controls.ControlTemplate |
CreateDataTemplate(Func<Object>)
Creates a data-template that uses the given delegate to create new instances.
Declaration
public static DataTemplate CreateDataTemplate(Func<object> factory)
Parameters
Type | Name | Description |
---|---|---|
System.Func<System.Object> | factory |
Returns
Type | Description |
---|---|
System.Windows.DataTemplate |