Class SettingsControlViewModel
View model for the Settings UserControl.
Inherited Members
Namespace: Phoenix.Settings
Assembly: Phoenix.Settings.dll
Syntax
public class SettingsControlViewModel : ViewModelBase<SettingsControlView>, IViewProvider, IClosingNotification, IViewInitialize
Constructors
View SourceSettingsControlViewModel(SettingsControlView, IWindowingControl, IEventAggregator, IPhoenixLogger, ISettingsManager)
Initializes a new instance of the SettingsControlViewModel class.
Declaration
public SettingsControlViewModel(SettingsControlView view, IWindowingControl windowing, IEventAggregator eventAggregator, IPhoenixLogger logger, ISettingsManager settingsManager)
Parameters
Type | Name | Description |
---|---|---|
SettingsControlView | view | The view. |
IWindowingControl | windowing | |
IEventAggregator | eventAggregator | The event aggregator. |
IPhoenixLogger | logger | The logger. |
ISettingsManager | settingsManager | The Settingsmanager. |
Properties
View SourceAddListEntryCommand
Gets command for adding an element to a list entry.
Declaration
public DelegateCommand<ListBox> AddListEntryCommand { get; }
Property Value
Type | Description |
---|---|
DelegateCommand<System.Windows.Controls.ListBox> |
CancelEditListEntryCommand
Gets command for editing a list entry command.
Declaration
public DelegateCommand<TextBox> CancelEditListEntryCommand { get; }
Property Value
Type | Description |
---|---|
DelegateCommand<System.Windows.Controls.TextBox> |
CommitEditListEntryCommand
Gets command for editing a list entry command.
Declaration
public DelegateCommand<TextBox> CommitEditListEntryCommand { get; }
Property Value
Type | Description |
---|---|
DelegateCommand<System.Windows.Controls.TextBox> |
DiscardChangesCommand
Gets command for discarding all changes to settings (for when the Cancel button is clicked).
Declaration
public DelegateCommand DiscardChangesCommand { get; }
Property Value
Type | Description |
---|---|
DelegateCommand |
EditListEntryCommand
Gets command for editing a list entry command.
Declaration
public DelegateCommand<TextBox> EditListEntryCommand { get; }
Property Value
Type | Description |
---|---|
DelegateCommand<System.Windows.Controls.TextBox> |
MoveListEntryDownCommand
Gets command for moving an element down in a list entry.
Declaration
public DelegateCommand<ListBox> MoveListEntryDownCommand { get; }
Property Value
Type | Description |
---|---|
DelegateCommand<System.Windows.Controls.ListBox> |
MoveListEntryUpCommand
Gets command for moving an element up in a list entry.
Declaration
public DelegateCommand<ListBox> MoveListEntryUpCommand { get; }
Property Value
Type | Description |
---|---|
DelegateCommand<System.Windows.Controls.ListBox> |
RemoveListEntryCommand
Gets command for removing an element from a list entry.
Declaration
public DelegateCommand<ListBox> RemoveListEntryCommand { get; }
Property Value
Type | Description |
---|---|
DelegateCommand<System.Windows.Controls.ListBox> |
SaveChangesAndCloseCommand
Gets command for saving all changes to settings and closing the window (for when the OK button is clicked).
Declaration
public DelegateCommand SaveChangesAndCloseCommand { get; }
Property Value
Type | Description |
---|---|
DelegateCommand |
SaveChangesCommand
Gets command for saving all changes to settings (for when the Apply button is clicked).
Declaration
public DelegateCommand SaveChangesCommand { get; }
Property Value
Type | Description |
---|---|
DelegateCommand |
Settings
Gets a list of all the individual settings keyed by category.
Declaration
public Dictionary<SettingsCategoryBase, ObservableCollection<SettingInfo>> Settings { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.Dictionary<SettingsCategoryBase, System.Collections.ObjectModel.ObservableCollection<SettingInfo>> |
SettingsCategories
Gets a list of all the setting categories.
Declaration
public ObservableCollection<SettingsCategoryBase> SettingsCategories { get; }
Property Value
Type | Description |
---|---|
System.Collections.ObjectModel.ObservableCollection<SettingsCategoryBase> |
ShowFileDialogCommand
Gets command for showing the file dialog for individual file settings.
Declaration
public DelegateCommand<SettingInfo> ShowFileDialogCommand { get; }
Property Value
Type | Description |
---|---|
DelegateCommand<SettingInfo> |
ShowFolderDialogCommand
Gets command for showing the folder dialog for individual folder settings.
Declaration
public DelegateCommand<SettingInfo> ShowFolderDialogCommand { get; }
Property Value
Type | Description |
---|---|
DelegateCommand<SettingInfo> |
ViewableSettings
Gets a list of the settings to display to screen.
Declaration
public ObservableCollection<SettingInfo> ViewableSettings { get; }
Property Value
Type | Description |
---|---|
System.Collections.ObjectModel.ObservableCollection<SettingInfo> |
Methods
View SourceHandleSelectionChanged(SelectionChangedEventArgs)
Handles the list box SelectionChanged event. Calls function to show the appropriate controls.
Declaration
public void HandleSelectionChanged(SelectionChangedEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Controls.SelectionChangedEventArgs | args | Event arguments passed from the event. |