Class MultiParameterEditorViewModel
View model for editing many Phoenix.Views.Parameters.IParameter objects, which allows users to add and remove parameters.
Implements
Inherited Members
Namespace: Phoenix.BotBrain.Controls
Assembly: Phoenix.Plugin.BotBrain.Parameters.dll
Syntax
public class MultiParameterEditorViewModel : ViewModelBase, INotifyPropertyChanged
Constructors
View SourceMultiParameterEditorViewModel(IPhoenixLogger, ICollection<IParameter>, IDictionary<IParameter, string>?, ParameterEditorTemplateSelector?)
Initializes a new instance of the MultiParameterEditorViewModel class.
Declaration
public MultiParameterEditorViewModel(IPhoenixLogger logger, ICollection<IParameter> parameters, IDictionary<IParameter, string>? groups = null, ParameterEditorTemplateSelector? templateSelector = null)
Parameters
Type | Name | Description |
---|---|---|
IPhoenixLogger | logger | The logger. |
ICollection<IParameter> | parameters | A collection of possible parameters. |
IDictionary<IParameter, string> | groups | An optional mapping between parameters and group names. |
ParameterEditorTemplateSelector | templateSelector | The template selector for displaying parameters. |
Properties
View SourceAddParameterCommand
Gets the command to add a parameter.
Declaration
public DelegateCommand<object> AddParameterCommand { get; }
Property Value
Type | Description |
---|---|
DelegateCommand<object> |
AnyHiddenParameters
Gets a value indicating whether or not any parameters are hidden.
Declaration
public bool AnyHiddenParameters { get; }
Property Value
Type | Description |
---|---|
bool |
Editable
Gets or sets a value indicating whether or not the control can be edited.
Declaration
public bool Editable { get; set; }
Property Value
Type | Description |
---|---|
bool |
Editing
Gets or sets a value indicating whether or not parameters are being edited.
Declaration
public bool Editing { get; set; }
Property Value
Type | Description |
---|---|
bool |
HiddenParameters
Gets the collection view for hidden parameters.
Declaration
public ICollectionView HiddenParameters { get; }
Property Value
Type | Description |
---|---|
ICollectionView |
LoggerPrefix
Gets or sets the logger prefix for reporting issues.
Declaration
public string LoggerPrefix { get; set; }
Property Value
Type | Description |
---|---|
string |
RemoveParameterCommand
Gets the command to remove a parameter.
Declaration
public DelegateCommand<IParameter> RemoveParameterCommand { get; }
Property Value
Type | Description |
---|---|
DelegateCommand<IParameter> |
SelectedParameter
Gets or sets the selected parameter in the dropdown list.
Declaration
public IParameter? SelectedParameter { get; set; }
Property Value
Type | Description |
---|---|
IParameter |
TemplateSelector
Gets or sets the template selector for displaying parameters.
Declaration
public DataTemplateSelector TemplateSelector { get; set; }
Property Value
Type | Description |
---|---|
DataTemplateSelector |
Title
Gets or sets the title of the control.
Declaration
public string Title { get; set; }
Property Value
Type | Description |
---|---|
string |
ToggleEditCommand
Gets the command to toggle editing.
Declaration
public DelegateCommand ToggleEditCommand { get; }
Property Value
Type | Description |
---|---|
DelegateCommand |
VisibleParameters
Gets the collection view for visible parameters.
Declaration
public ICollectionView VisibleParameters { get; }
Property Value
Type | Description |
---|---|
ICollectionView |
Events
View SourceParametersChanged
Occurs when parameters are added or removed.
Declaration
public event EventHandler ParametersChanged
Event Type
Type | Description |
---|---|
EventHandler |