The main ViewModel of the Ribbon Customization Dialog.
This VM is specific to Ribbon Customization, though it uses ViewModelNodes, which are not.
Public Member Functions |
|
RibbonViewModel (RibbonControl aControl) | |
void | CreateTree (RibbonControl aControl) |
void | SetSelection (Object newSelection) |
This method sets the selection in the model
programmatically. |
|
void | SelectNextNode () |
void | SelectPreviousNode () |
void | AddItemAsChildInSource (ViewModelNode targetNode, Object ribbonItem) |
void | AddItemAsChildInSource (ViewModelNode targetNode, Object ribbonItem, int index) |
void | AddItemAsSiblingInSource (ViewModelNode sibling, Object item, bool insertAbove) |
void | RemoveItem (ViewModelNode node) |
Static Public Attributes |
|
static readonly DependencyProperty | IsDirtyProperty |
static readonly DependencyProperty | HasConditionalPanelSourcesProperty |
static readonly DependencyProperty | OnlyShowAvailableProperty |
static readonly DependencyProperty | SelectedNodeProperty |
static readonly String | OnlyShowAvailablePropertyName = "OnlyShowAvailable" |
static readonly String | SelectedNodePropertyName = "SelectedNode" |
static readonly DependencyProperty | SelectedPanelProperty |
static readonly String | SelectedPanelPropertyName = "SelectedPanel" |
Protected Member Functions |
|
virtual void | OnSelectedNodeChanged (EventArgs args) |
virtual void | OnSelectedPanelChanged (EventArgs args) |
Properties |
|
RibbonControl |
RibbonControl [get, set] |
bool |
IsDirty [get, set] |
ViewModelNode |
RootNode [get, set] |
ReadOnlyCollection< ViewModelNode > |
Roots [get, set] |
bool |
OnlyShowAvailable [get, set] |
When true, 'unavailable' UI elements should
be filtered out. |
|
ViewModelNode |
SelectedNode [get, set] |
Object |
SelectedPanel [get, set] |
The currently selected panel, based on the
current Node selection. |
|
Events |
|
EventHandler< EventArgs > | SelectedNodeChanged |
EventHandler< EventArgs > | SelectedPanelChanged |
PropertyChangedEventHandler | PropertyChanged |
WPFCustomControls::Customization::ViewModel::RibbonViewModel::RibbonViewModel | ( | RibbonControl | aControl | ) | [inline] |
void WPFCustomControls::Customization::ViewModel::RibbonViewModel::CreateTree | ( | RibbonControl | aControl | ) | [inline] |
void WPFCustomControls::Customization::ViewModel::RibbonViewModel::SetSelection | ( | Object | newSelection | ) | [inline] |
This method sets the selection in the model programmatically.
This is as opposed to having the view report selection changes. By setting the selection, we have to also guarantee that the viewmodel's node is properly expanded.
newSelection | The new viewmodel node source item to select. |
void WPFCustomControls::Customization::ViewModel::RibbonViewModel::SelectNextNode | ( | ) | [inline] |
void WPFCustomControls::Customization::ViewModel::RibbonViewModel::SelectPreviousNode | ( | ) | [inline] |
virtual void WPFCustomControls::Customization::ViewModel::RibbonViewModel::OnSelectedNodeChanged | ( | EventArgs | args | ) | [inline, protected, virtual] |
virtual void WPFCustomControls::Customization::ViewModel::RibbonViewModel::OnSelectedPanelChanged | ( | EventArgs | args | ) | [inline, protected, virtual] |
void WPFCustomControls::Customization::ViewModel::RibbonViewModel::AddItemAsChildInSource | ( | ViewModelNode | targetNode, |
Object | ribbonItem | ||
) | [inline] |
void WPFCustomControls::Customization::ViewModel::RibbonViewModel::AddItemAsChildInSource | ( | ViewModelNode | targetNode, |
Object | ribbonItem, | ||
int | index | ||
) | [inline] |
void WPFCustomControls::Customization::ViewModel::RibbonViewModel::AddItemAsSiblingInSource | ( | ViewModelNode | sibling, |
Object | item, | ||
bool | insertAbove | ||
) | [inline] |
void WPFCustomControls::Customization::ViewModel::RibbonViewModel::RemoveItem | ( | ViewModelNode | node | ) | [inline] |
readonly DependencyProperty
WPFCustomControls::Customization::ViewModel::RibbonViewModel::IsDirtyProperty
[static] |
DependencyProperty.Register( "IsDirty", typeof(bool), typeof(RibbonViewModel), new FrameworkPropertyMetadata( false))
readonly DependencyProperty
WPFCustomControls::Customization::ViewModel::RibbonViewModel::HasConditionalPanelSourcesProperty
[static] |
DependencyProperty.Register( "HasConditionalPanelSources", typeof(bool), typeof(RibbonViewModel), new FrameworkPropertyMetadata( false))
readonly DependencyProperty
WPFCustomControls::Customization::ViewModel::RibbonViewModel::OnlyShowAvailableProperty
[static] |
DependencyProperty.Register( "OnlyShowAvailable", typeof(bool), typeof(RibbonViewModel), new FrameworkPropertyMetadata( true))
readonly DependencyProperty
WPFCustomControls::Customization::ViewModel::RibbonViewModel::SelectedNodeProperty
[static] |
DependencyProperty.Register( "SelectedNode", typeof(ViewModelNode), typeof(RibbonViewModel), new FrameworkPropertyMetadata( null, new PropertyChangedCallback(OnSelectedNodeChange)))
readonly String
WPFCustomControls::Customization::ViewModel::RibbonViewModel::OnlyShowAvailablePropertyName
= "OnlyShowAvailable" [static] |
readonly String
WPFCustomControls::Customization::ViewModel::RibbonViewModel::SelectedNodePropertyName
= "SelectedNode" [static] |
readonly DependencyProperty
WPFCustomControls::Customization::ViewModel::RibbonViewModel::SelectedPanelProperty
[static] |
DependencyProperty.Register( "SelectedPanel", typeof(Object), typeof(RibbonViewModel), new FrameworkPropertyMetadata(null, new PropertyChangedCallback(OnSelectedPanelPropertyChanged)))
readonly String
WPFCustomControls::Customization::ViewModel::RibbonViewModel::SelectedPanelPropertyName
= "SelectedPanel" [static] |
RibbonControl
WPFCustomControls::Customization::ViewModel::RibbonViewModel::RibbonControl
[get, set] |
bool
WPFCustomControls::Customization::ViewModel::RibbonViewModel::IsDirty
[get, set] |
ViewModelNode
WPFCustomControls::Customization::ViewModel::RibbonViewModel::RootNode
[get, set] |
ReadOnlyCollection<ViewModelNode>
WPFCustomControls::Customization::ViewModel::RibbonViewModel::Roots
[get, set] |
bool
WPFCustomControls::Customization::ViewModel::RibbonViewModel::OnlyShowAvailable
[get, set] |
When true, 'unavailable' UI elements should be filtered out.
ViewModelNode
WPFCustomControls::Customization::ViewModel::RibbonViewModel::SelectedNode
[get, set] |
Object
WPFCustomControls::Customization::ViewModel::RibbonViewModel::SelectedPanel
[get, set] |
The currently selected panel, based on the current Node selection.
EventHandler<EventArgs> WPFCustomControls::Customization::ViewModel::RibbonViewModel::SelectedNodeChanged |
EventHandler<EventArgs> WPFCustomControls::Customization::ViewModel::RibbonViewModel::SelectedPanelChanged |
PropertyChangedEventHandler WPFCustomControls::Customization::ViewModel::RibbonViewModel::PropertyChanged |