Volume Control
Application-specific hotkeys for Windows
|
Provides a DataTemplate instance constructed in codebehind using FrameworkElementFactory. More...
Public Member Functions | |
bool | CanProvideDataTemplate (Type valueType) |
Checks if this ITemplateProvider instance can provide a DataTemplate for the specified valueType . More... | |
DataTemplate? | ProvideDataTemplate (Type valueType) |
Gets the DataTemplate instance to use for displaying an editor control for the action setting's value. More... | |
Provides a DataTemplate instance constructed in codebehind using FrameworkElementFactory.
Any public, non-static, non-abstract class that implements this interface can be specified for HotkeyActionSettingAttribute.DataTemplateProviderType.
To create an ITemplateProvider, first create a new class that implements it:
You would then specify the IntDataTemplateProvider
type in your HotkeyActionSettingAttribute:
bool VolumeControl.Core.ITemplateProvider.CanProvideDataTemplate | ( | Type | valueType | ) |
Checks if this ITemplateProvider instance can provide a DataTemplate for the specified valueType .
valueType | The value type of the action setting to display in the template. |
true
when this instance supports the valueType ; otherwise false
.DataTemplate? VolumeControl.Core.ITemplateProvider.ProvideDataTemplate | ( | Type | valueType | ) |
Gets the DataTemplate instance to use for displaying an editor control for the action setting's value.
The returned DataTemplate will always be used with a DataContext of the Input.Actions.Settings.IActionSettingInstance instance for that action setting. Therefore, valid data binding paths can be relative to an Input.Actions.Settings.IActionSettingInstance instance, or absolute by directly specifying a binding Source.
A data binding path of "<see langword="Value"/>" will return the value instance of type HotkeyActionSettingAttribute.ValueType.
Return null
to allow another data template to be selected.
valueType | The value type of the action setting to display in the template. |
null
.