Show / Hide Table of Contents

Class ParameterEditorTemplateSelector

A data template selector using one or more customizable resource files.

Inheritance
object
DataTemplateSelector
ParameterEditorTemplateSelector
TestParameterEditorTemplateSelector
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
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 Source

ParameterEditorTemplateSelector(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 Source

LazyLoadResources(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.

View Source

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.

View Source

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.

View Source

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.

Overrides
DataTemplateSelector.SelectTemplate(object, DependencyObject)
  • View Source
In this article
Back to top Generated by DocFX