Class ParameterEditorTemplateSelector
A data template selector using one or more customizable resource files.
Inheritance
Inherited Members
Namespace: Phoenix.BotBrain.Controls
Assembly: Phoenix.Plugin.BotBrain.Parameters.dll
Syntax
public class ParameterEditorTemplateSelector : DataTemplateSelector
Remarks
Initializes a new instance of the ParameterEditorTemplateSelector class.
Constructors
View SourceParameterEditorTemplateSelector(IDictionary<string, Type>?)
A data template selector using one or more customizable resource files.
Declaration
public ParameterEditorTemplateSelector(IDictionary<string, Type>? customParameters = null)
Parameters
Type | Name | Description |
---|---|---|
IDictionary<string, Type> | customParameters | A mapping from custom parameter type to UI control type. |
Remarks
Initializes a new instance of the ParameterEditorTemplateSelector class.
Methods
View SourceLazyLoadResources(Assembly, string)
Creates a lazily-loaded resource dictionary referring to the given file in the assembly.
Declaration
protected static Lazy<ResourceDictionary> LazyLoadResources(Assembly assembly, string path)
Parameters
Type | Name | Description |
---|---|---|
Assembly | assembly | The assembly. |
string | path | The resource file path. |
Returns
Type | Description |
---|---|
Lazy<ResourceDictionary> | A lazy resource dictionary object. |
LazyLoadResources<T>(string)
Creates a lazily-loaded resource dictionary referring to the given file in the type's assembly.
Declaration
protected static Lazy<ResourceDictionary> LazyLoadResources<T>(string path)
Parameters
Type | Name | Description |
---|---|---|
string | path | The resource file path. |
Returns
Type | Description |
---|---|
Lazy<ResourceDictionary> | A lazy resource dictionary object. |
Type Parameters
Name | Description |
---|---|
T | The type within the assembly. |
SelectTemplate(IParameter, DependencyObject)
Returns a data template based on custom logic.
Declaration
protected virtual DataTemplate SelectTemplate(IParameter item, DependencyObject container)
Parameters
Type | Name | Description |
---|---|---|
IParameter | item | The parameter to display. |
DependencyObject | container | The container. |
Returns
Type | Description |
---|---|
DataTemplate | A custom data template. |
SelectTemplate(object, DependencyObject)
When overridden in a derived class, returns a DataTemplate based on custom logic.
Declaration
public override DataTemplate SelectTemplate(object item, DependencyObject container)
Parameters
Type | Name | Description |
---|---|---|
object | item | The data object for which to select the template. |
DependencyObject | container | The data-bound object. |
Returns
Type | Description |
---|---|
DataTemplate | Returns a DataTemplate or null. The default value is null. |