C# Class Fluent.Ribbon

Inheritance: System.Windows.Controls.Control
Show file Open project: Gainedge/BetterExplorer Class Usage Examples

Public Properties

Property Type Description
AddToQuickAccessCommand System.Windows.Input.RoutedCommand
AutomaticStateManagementProperty System.Windows.DependencyProperty
CanCustomizeQuickAccessToolBarProperty System.Windows.DependencyProperty
CanCustomizeRibbonProperty System.Windows.DependencyProperty
CanQuickAccessLocationChangingProperty System.Windows.DependencyProperty
ContentGapHeightProperty System.Windows.DependencyProperty
CustomizeQuickAccessToolbarCommand System.Windows.Input.RoutedCommand
CustomizeTheRibbonCommand System.Windows.Input.RoutedCommand
IsAutomaticCollapseEnabledProperty System.Windows.DependencyProperty
IsCollapsedProperty System.Windows.DependencyProperty
IsMinimizedProperty System.Windows.DependencyProperty
IsQuickAccessToolBarVisibleProperty System.Windows.DependencyProperty
MenuProperty System.Windows.DependencyProperty
RemoveFromQuickAccessCommand System.Windows.Input.RoutedCommand
SelectedTabIndexProperty System.Windows.DependencyProperty
SelectedTabItemProperty System.Windows.DependencyProperty
ShowQuickAccessAboveCommand System.Windows.Input.RoutedCommand
ShowQuickAccessBelowCommand System.Windows.Input.RoutedCommand
ShowQuickAccessToolBarAboveRibbonProperty System.Windows.DependencyProperty
TitleProperty System.Windows.DependencyProperty
ToggleMinimizeTheRibbonCommand System.Windows.Input.RoutedCommand

Private Properties

Property Type Description
AttachToWindow void
CoerceAutoStateManagement object
DetachFromWindow void
FileExists bool
FindParentRibbonControl IRibbonControl
GetAdornerLayer System.Windows.Controls.AdornerLayer
GetFirstVisibleItem RibbonTabItem
GetIsolatedStorageFile IsolatedStorageFile
GetLastVisibleItem RibbonTabItem
InitRibbonContextMenu void
InitialLoadState void
MaintainIsCollapsed void
OnAddToQuickAccessCommandCanExecute void
OnAddToQuickAccessCommandExecuted void
OnApplicationMenuChanged void
OnApplyTemplate void
OnAutoStateManagement void
OnBackstageEscapeKeyDown void
OnCoerceStyle object
OnContextMenuOpened void
OnCustomizeQuickAccessToolbarCommandCanExecute void
OnCustomizeQuickAccessToolbarCommandExecuted void
OnCustomizeTheRibbonCommandCanExecute void
OnCustomizeTheRibbonCommandExecuted void
OnFirstToolbarLoaded void
OnGroupsCollectionChanged void
OnIsCollapsedChanged void
OnIsMinimizedChanged void
OnJustLayoutUpdated void
OnKeyDown void
OnLoaded void
OnOwnerWindowClosed void
OnQuickAccessItemsChanged void
OnQuickAccessItemsCollectionChanged void
OnRemoveFromQuickAccessCommandCanExecute void
OnRemoveFromQuickAccessCommandExecuted void
OnSelectedTabIndexChanged void
OnSelectedTabItemChanged void
OnShowQuickAccesToolBarAboveRibbonChanged void
OnShowQuickAccessAboveCommandExecuted void
OnShowQuickAccessBelowCommandExecuted void
OnSizeChanged void
OnTabControlSelectionChanged void
OnTabsCollectionChanged void
OnTitleChanged void
OnToggleMinimizeTheRibbonCommandCanExecute void
OnToggleMinimizeTheRibbonCommandExecuted void
OnToolbarItemsCollectionChanged void
OnUnloaded void
OnWindowSizeChanged void
ParseAndAddToQuickAccessToolBar void
QuickAccessToolbarRequestCustomize void
Ribbon System
SaveState void
SaveWindowSize void
TraverseLogicalTree void

Public Methods

Method Description
AddToQuickAccessToolBar ( UIElement element ) : void

Adds the given element to quick access toolbar

ClearQuickAccessToolBar ( ) : void

Clears quick access toolbar

IsInQuickAccessToolBar ( UIElement element ) : bool

Determines whether the given element is in quick access toolbar

LoadState ( ) : void

Loads the State from Isolated Storage (in user store for domain)

LoadState ( System.Stream stream ) : void

Loads state from the given stream

RemoveFromQuickAccessToolBar ( UIElement element ) : void

Removes the given elements from quick access toolbar

ResetState ( ) : void

Resets automatically saved state

SaveState ( System.Stream stream ) : void

Saves state to the given stream

Protected Methods

Method Description
OnContextMenuClosing ( System.Windows.Controls.ContextMenuEventArgs e ) : void

Invoked whenever an unhandled E:System.Windows.FrameworkElement.ContextMenuClosing routed event reaches this class in its route. Implement this method to add class handling for this event.

OnContextMenuOpening ( System.Windows.Controls.ContextMenuEventArgs e ) : void

Invoked whenever an unhandled E:System.Windows.FrameworkElement.ContextMenuOpening routed event reaches this class in its route. Implement this method to add class handling for this event.

OnGotFocus ( RoutedEventArgs e ) : void

Invoked whenever an unhandled System.Windows.UIElement.GotFocus event reaches this element in its route.

OnItemAddedToQuickAccessToolbar ( UIElementEventArgs e ) : void
OnItemRemovedToQuickAccessToolbar ( UIElementEventArgs e ) : void

Private Methods

Method Description
AttachToWindow ( ) : void
CoerceAutoStateManagement ( DependencyObject d, object basevalue ) : object
DetachFromWindow ( ) : void
FileExists ( IsolatedStorageFile storage, string fileName ) : bool
FindParentRibbonControl ( DependencyObject element ) : IRibbonControl
GetAdornerLayer ( UIElement element ) : System.Windows.Controls.AdornerLayer

Get adorner layer for element

GetFirstVisibleItem ( ) : RibbonTabItem
GetIsolatedStorageFile ( ) : IsolatedStorageFile
GetLastVisibleItem ( ) : RibbonTabItem
InitRibbonContextMenu ( ) : void
InitialLoadState ( ) : void
MaintainIsCollapsed ( ) : void
OnAddToQuickAccessCommandCanExecute ( object sender, System.Windows.Input.CanExecuteRoutedEventArgs e ) : void
OnAddToQuickAccessCommandExecuted ( object sender, System.Windows.Input.ExecutedRoutedEventArgs e ) : void
OnApplicationMenuChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnApplyTemplate ( ) : void
OnAutoStateManagement ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnBackstageEscapeKeyDown ( object sender, System.Windows.Input.KeyEventArgs e ) : void
OnCoerceStyle ( DependencyObject d, object basevalue ) : object
OnContextMenuOpened ( object sender, RoutedEventArgs e ) : void
OnCustomizeQuickAccessToolbarCommandCanExecute ( object sender, System.Windows.Input.CanExecuteRoutedEventArgs e ) : void
OnCustomizeQuickAccessToolbarCommandExecuted ( object sender, System.Windows.Input.ExecutedRoutedEventArgs e ) : void
OnCustomizeTheRibbonCommandCanExecute ( object sender, System.Windows.Input.CanExecuteRoutedEventArgs e ) : void
OnCustomizeTheRibbonCommandExecuted ( object sender, System.Windows.Input.ExecutedRoutedEventArgs e ) : void
OnFirstToolbarLoaded ( object sender, RoutedEventArgs e ) : void
OnGroupsCollectionChanged ( object sender, NotifyCollectionChangedEventArgs e ) : void

Handles collection of contextual tab groups ghanges

OnIsCollapsedChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnIsMinimizedChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnJustLayoutUpdated ( object sender, EventArgs e ) : void
OnKeyDown ( object sender, System.Windows.Input.KeyEventArgs e ) : void
OnLoaded ( object sender, RoutedEventArgs e ) : void
OnOwnerWindowClosed ( object sender, EventArgs e ) : void

Called when the ownerWindow is closed, so that we set it to null and clear the TitleProperty

OnQuickAccessItemsChanged ( object sender, NotifyCollectionChangedEventArgs e ) : void
OnQuickAccessItemsCollectionChanged ( object sender, NotifyCollectionChangedEventArgs e ) : void

Handles collection of quick access menu items changes

OnRemoveFromQuickAccessCommandCanExecute ( object sender, System.Windows.Input.CanExecuteRoutedEventArgs e ) : void
OnRemoveFromQuickAccessCommandExecuted ( object sender, System.Windows.Input.ExecutedRoutedEventArgs e ) : void
OnSelectedTabIndexChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnSelectedTabItemChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnShowQuickAccesToolBarAboveRibbonChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void

Handles ShowQuickAccessToolBarAboveRibbon property changed

OnShowQuickAccessAboveCommandExecuted ( object sender, System.Windows.Input.ExecutedRoutedEventArgs e ) : void
OnShowQuickAccessBelowCommandExecuted ( object sender, System.Windows.Input.ExecutedRoutedEventArgs e ) : void
OnSizeChanged ( object sender, System.Windows.SizeChangedEventArgs e ) : void
OnTabControlSelectionChanged ( object sender, System.Windows.Controls.SelectionChangedEventArgs e ) : void
OnTabsCollectionChanged ( object sender, NotifyCollectionChangedEventArgs e ) : void

Handles collection of ribbon tabs changed

OnTitleChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnToggleMinimizeTheRibbonCommandCanExecute ( object sender, System.Windows.Input.CanExecuteRoutedEventArgs e ) : void
OnToggleMinimizeTheRibbonCommandExecuted ( object sender, System.Windows.Input.ExecutedRoutedEventArgs e ) : void
OnToolbarItemsCollectionChanged ( object sender, NotifyCollectionChangedEventArgs e ) : void

Handles collection of toolbar items changes

OnUnloaded ( object sender, RoutedEventArgs e ) : void
OnWindowSizeChanged ( object sender, System.Windows.SizeChangedEventArgs e ) : void
ParseAndAddToQuickAccessToolBar ( string data ) : void
QuickAccessToolbarRequestCustomize ( object sender, RoutedEventArgs e ) : void
Ribbon ( ) : System
SaveState ( ) : void
SaveWindowSize ( Window wnd ) : void
TraverseLogicalTree ( DependencyObject item, string path, string>.IDictionary paths ) : void

Method Details

AddToQuickAccessToolBar() public method

Adds the given element to quick access toolbar
public AddToQuickAccessToolBar ( UIElement element ) : void
element UIElement Element
return void

ClearQuickAccessToolBar() public method

Clears quick access toolbar
public ClearQuickAccessToolBar ( ) : void
return void

IsInQuickAccessToolBar() public method

Determines whether the given element is in quick access toolbar
public IsInQuickAccessToolBar ( UIElement element ) : bool
element UIElement Element
return bool

LoadState() public method

Loads the State from Isolated Storage (in user store for domain)
public LoadState ( ) : void
return void

LoadState() public method

Loads state from the given stream
public LoadState ( System.Stream stream ) : void
stream System.Stream Stream
return void

OnContextMenuClosing() protected method

Invoked whenever an unhandled E:System.Windows.FrameworkElement.ContextMenuClosing routed event reaches this class in its route. Implement this method to add class handling for this event.
protected OnContextMenuClosing ( System.Windows.Controls.ContextMenuEventArgs e ) : void
e System.Windows.Controls.ContextMenuEventArgs Provides data about the event.
return void

OnContextMenuOpening() protected method

Invoked whenever an unhandled E:System.Windows.FrameworkElement.ContextMenuOpening routed event reaches this class in its route. Implement this method to add class handling for this event.
protected OnContextMenuOpening ( System.Windows.Controls.ContextMenuEventArgs e ) : void
e System.Windows.Controls.ContextMenuEventArgs The that contains the event data.
return void

OnGotFocus() protected method

Invoked whenever an unhandled System.Windows.UIElement.GotFocus event reaches this element in its route.
protected OnGotFocus ( RoutedEventArgs e ) : void
e System.Windows.RoutedEventArgs The System.Windows.RoutedEventArgs that contains the event data.
return void

OnItemAddedToQuickAccessToolbar() protected method

protected OnItemAddedToQuickAccessToolbar ( UIElementEventArgs e ) : void
e UIElementEventArgs
return void

OnItemRemovedToQuickAccessToolbar() protected method

protected OnItemRemovedToQuickAccessToolbar ( UIElementEventArgs e ) : void
e UIElementEventArgs
return void

RemoveFromQuickAccessToolBar() public method

Removes the given elements from quick access toolbar
public RemoveFromQuickAccessToolBar ( UIElement element ) : void
element UIElement Element
return void

ResetState() public static method

Resets automatically saved state
public static ResetState ( ) : void
return void

SaveState() public method

Saves state to the given stream
public SaveState ( System.Stream stream ) : void
stream System.Stream Stream
return void

Property Details

AddToQuickAccessCommand public static property

Gets add to quick access toolbar command
public static RoutedCommand,System.Windows.Input AddToQuickAccessCommand
return System.Windows.Input.RoutedCommand

AutomaticStateManagementProperty public static property

Using a DependencyProperty as the backing store for AutomaticStateManagement. This enables animation, styling, binding, etc...
public static DependencyProperty,System.Windows AutomaticStateManagementProperty
return System.Windows.DependencyProperty

CanCustomizeQuickAccessToolBarProperty public static property

Using a DependencyProperty as the backing store for CanCustomizeQuickAccessToolBar. This enables animation, styling, binding, etc...
public static DependencyProperty,System.Windows CanCustomizeQuickAccessToolBarProperty
return System.Windows.DependencyProperty

CanCustomizeRibbonProperty public static property

Using a DependencyProperty as the backing store for CanCustomizeRibbon. This enables animation, styling, binding, etc...
public static DependencyProperty,System.Windows CanCustomizeRibbonProperty
return System.Windows.DependencyProperty

CanQuickAccessLocationChangingProperty public static property

Using a DependencyProperty as the backing store for CanQuickAccessLocationChanging. This enables animation, styling, binding, etc...
public static DependencyProperty,System.Windows CanQuickAccessLocationChangingProperty
return System.Windows.DependencyProperty

ContentGapHeightProperty public static property

DependencyProperty for ContentGapHeight
public static DependencyProperty,System.Windows ContentGapHeightProperty
return System.Windows.DependencyProperty

CustomizeQuickAccessToolbarCommand public static property

Gets customize quick access toolbar command
public static RoutedCommand,System.Windows.Input CustomizeQuickAccessToolbarCommand
return System.Windows.Input.RoutedCommand

CustomizeTheRibbonCommand public static property

Gets customize the ribbon command
public static RoutedCommand,System.Windows.Input CustomizeTheRibbonCommand
return System.Windows.Input.RoutedCommand

IsAutomaticCollapseEnabledProperty public static property

Using a DependencyProperty as the backing store for IsCollapsed. This enables animation, styling, binding, etc...
public static DependencyProperty,System.Windows IsAutomaticCollapseEnabledProperty
return System.Windows.DependencyProperty

IsCollapsedProperty public static property

DependencyProperty for IsCollapsed
public static DependencyProperty,System.Windows IsCollapsedProperty
return System.Windows.DependencyProperty

IsMinimizedProperty public static property

Using a DependencyProperty as the backing store for IsMinimized. This enables animation, styling, binding, etc...
public static DependencyProperty,System.Windows IsMinimizedProperty
return System.Windows.DependencyProperty

IsQuickAccessToolBarVisibleProperty public static property

Using a DependencyProperty as the backing store for IsQuickAccessToolBarVisible. This enables animation, styling, binding, etc...
public static DependencyProperty,System.Windows IsQuickAccessToolBarVisibleProperty
return System.Windows.DependencyProperty

MenuProperty public static property

Using a DependencyProperty as the backing store for Button. This enables animation, styling, binding, etc...
public static DependencyProperty,System.Windows MenuProperty
return System.Windows.DependencyProperty

RemoveFromQuickAccessCommand public static property

Gets remove from quick access command
public static RoutedCommand,System.Windows.Input RemoveFromQuickAccessCommand
return System.Windows.Input.RoutedCommand

SelectedTabIndexProperty public static property

Using a DependencyProperty as the backing store for SelectedTabindex. This enables animation, styling, binding, etc...
public static DependencyProperty,System.Windows SelectedTabIndexProperty
return System.Windows.DependencyProperty

SelectedTabItemProperty public static property

Using a DependencyProperty as the backing store for SelectedTabItem. This enables animation, styling, binding, etc...
public static DependencyProperty,System.Windows SelectedTabItemProperty
return System.Windows.DependencyProperty

ShowQuickAccessAboveCommand public static property

Gets show quick access above command
public static RoutedCommand,System.Windows.Input ShowQuickAccessAboveCommand
return System.Windows.Input.RoutedCommand

ShowQuickAccessBelowCommand public static property

Gets show quick access below command
public static RoutedCommand,System.Windows.Input ShowQuickAccessBelowCommand
return System.Windows.Input.RoutedCommand

ShowQuickAccessToolBarAboveRibbonProperty public static property

Using a DependencyProperty as the backing store for ShowAboveRibbon. This enables animation, styling, binding, etc...
public static DependencyProperty,System.Windows ShowQuickAccessToolBarAboveRibbonProperty
return System.Windows.DependencyProperty

TitleProperty public static property

Using a DependencyProperty as the backing store for Title. This enables animation, styling, binding, etc...
public static DependencyProperty,System.Windows TitleProperty
return System.Windows.DependencyProperty

ToggleMinimizeTheRibbonCommand public static property

Gets toggle ribbon minimize command
public static RoutedCommand,System.Windows.Input ToggleMinimizeTheRibbonCommand
return System.Windows.Input.RoutedCommand