C# Class Microsoft.Windows.Controls.Ribbon.RibbonGallery

Inheritance: System.Windows.Controls.ItemsControl, IWeakEventListener, IPreviewCommandSource
Show file Open project: kasicass/kasicass Class Usage Examples

Public Properties

Property Type Description
AllFilterItemContainerStyleProperty System.Windows.DependencyProperty
AllFilterItemTemplateProperty System.Windows.DependencyProperty
CanAddToQuickAccessToolBarDirectlyProperty System.Windows.DependencyProperty
CanUserFilterProperty System.Windows.DependencyProperty
CategoryStyleProperty System.Windows.DependencyProperty
CategoryTemplateProperty System.Windows.DependencyProperty
ColumnsStretchToFillProperty System.Windows.DependencyProperty
CommandParameterProperty System.Windows.DependencyProperty
CommandProperty System.Windows.DependencyProperty
CommandTargetProperty System.Windows.DependencyProperty
FilterItemContainerStyleProperty System.Windows.DependencyProperty
FilterItemContainerStyleSelectorProperty System.Windows.DependencyProperty
FilterItemTemplateProperty System.Windows.DependencyProperty
FilterItemTemplateSelectorProperty System.Windows.DependencyProperty
FilterMenuButtonStyleProperty System.Windows.DependencyProperty
FilterPaneContentProperty System.Windows.DependencyProperty
FilterPaneContentTemplateProperty System.Windows.DependencyProperty
GalleryItemStyleProperty System.Windows.DependencyProperty
GalleryItemTemplateProperty System.Windows.DependencyProperty
HighlightedItemProperty System.Windows.DependencyProperty
IsSharedColumnSizeScopeProperty System.Windows.DependencyProperty
IsSynchronizedWithCurrentItemProperty System.Windows.DependencyProperty
MaxColumnCountProperty System.Windows.DependencyProperty
MinColumnCountProperty System.Windows.DependencyProperty
PreviewCommandParameterProperty System.Windows.DependencyProperty
QuickAccessToolBarIdProperty System.Windows.DependencyProperty
RibbonProperty System.Windows.DependencyProperty
SelectedItemProperty System.Windows.DependencyProperty
SelectedValuePathProperty System.Windows.DependencyProperty
SelectedValueProperty System.Windows.DependencyProperty
SelectionChangedEvent System.Windows.RoutedEvent
SmallImageSourceProperty System.Windows.DependencyProperty
ToolTipDescriptionProperty System.Windows.DependencyProperty
ToolTipFooterDescriptionProperty System.Windows.DependencyProperty
ToolTipFooterImageSourceProperty System.Windows.DependencyProperty
ToolTipFooterTitleProperty System.Windows.DependencyProperty
ToolTipImageSourceProperty System.Windows.DependencyProperty
ToolTipTitleProperty System.Windows.DependencyProperty

Private Properties

Property Type Description
AddCurrentItemChangedListener void
ChangeHighlight void
ChangeSelection void
CoerceHighlightedItem object
CoerceMaxColumnCount object
CoerceSelectedItem object
CoerceSelectedValue object
ContainsItem bool
ContainsValue bool
DidMouseMove bool
FilterCanExecute void
FilterExecuted void
ForceCoerceHighlightedItem void
ForceCoerceSelectedItem void
ForceCoerceSelectedValue void
GetInnerText object
GetSelectableValueFromItem object
GetSelectableValueFromItem object
GetSourceCollectionView CollectionView
HookCommand void
IWeakEventListener bool
InvalidateMeasureOnAllCategoriesPanel void
IsMinMaxColumnCountValid bool
MoveCurrentTo void
MoveCurrentToPosition void
OnCanExecuteChanged void
OnCategoryStyleChanged void
OnCategoryTemplateChanged void
OnCoerceCurrentFilterStyle object
OnCoerceCurrentFilterTemplate object
OnCoerceFilterItemContainerStyleSelector object
OnCoerceFilterItemTemplateSelector object
OnCoerceItemContainerStyle object
OnCoerceItemTemplate object
OnCommandChanged void
OnCurrentFilterChanged void
OnCurrentFilterTemplateChanged void
OnCurrentItemChanged void
OnDismissPopup void
OnDismissPopupThunk void
OnFilterButtonItemContainerGeneratorStatusChanged void
OnFilterItemContainerStyleChanged void
OnFilterItemContainerStyleSelectorChanged void
OnFilterItemTemplateChanged void
OnFilterItemTemplateSelectorChanged void
OnHighlightedItemChangedPrivate void
OnIsSelectedChanged void
OnIsSynchronizedWithCurrentItemChanged void
OnItemContainerGeneratorStatusChanged void
OnLayoutPropertyChange void
OnLoaded void
OnMouseMove void
OnNavigationKeyDown void
OnNotifyGalleryItemTemplateOrStylePropertyChanged void
OnSelectedValuePathChanged void
OnSourceCollectionViewCurrentItemChanged void
OnUnloaded void
RemoveCurrentItemChangedListener void
RepopulateCategoryFilters void
RibbonGallery System
SetHeaderBindingForCurrentFilterItem void
SetTemplateBindingForCurrentFilterItem void
SynchronizeWithCurrentItem void
SynchronizeWithCurrentItem void
UnhookCommand void
UpdateCanExecute void
UpdateIsSynchronizedWithCurrentItemInternal void
VerifyEqual bool
filterMenuButton_Loaded void

Public Methods

Method Description
OnApplyTemplate ( ) : void
ScrollIntoView ( object item ) : void

This method allows a particular item to be scrolled into view

Note that this method currently does not support the virtualization

Protected Methods

Method Description
ClearContainerForItemOverride ( DependencyObject element, object item ) : void

Called when the container is being detached from the parent ItemsControl

GetContainerForItemOverride ( ) : DependencyObject
IsItemItsOwnContainerOverride ( object item ) : bool
OnCreateAutomationPeer ( ) : System.Windows.Automation.Peers.AutomationPeer
OnHighlightedItemChanged ( System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnInitialized ( EventArgs e ) : void
OnIsKeyboardFocusWithinChanged ( System.Windows.DependencyPropertyChangedEventArgs e ) : void

Called when the focus changes within the subtree

OnItemsChanged ( NotifyCollectionChangedEventArgs e ) : void

This method is invoked when the Items property changes.

OnItemsSourceChanged ( IEnumerable oldValue, IEnumerable newValue ) : void
OnMouseEnter ( System.Windows.Input.MouseEventArgs e ) : void
OnMouseLeave ( System.Windows.Input.MouseEventArgs e ) : void
OnPreviewKeyDown ( System.Windows.Input.KeyEventArgs e ) : void

Gallery's ScrollViewer handles up/down arrow keys and marks the KeyDown event handled even if the next focusable element is not its descendant. The logic here enables navigation to outside the gallery (for e.g. from the last/first galleryItem to gallery's sibling MenuItem).

OnSelectionChanged ( RoutedPropertyChangedEventArgs e ) : void

Called when SelectedItem changes. Default implementation fires the SelectionChanged event.

PrepareContainerForItemOverride ( DependencyObject element, object item ) : void

Called when the container is being attached to the parent ItemsControl

Private Methods

Method Description
AddCurrentItemChangedListener ( ) : void
ChangeHighlight ( object item, RibbonGalleryItem container, bool isHighlighted ) : void
ChangeSelection ( object item, RibbonGalleryItem container, bool isSelected ) : void
CoerceHighlightedItem ( DependencyObject d, object value ) : object
CoerceMaxColumnCount ( DependencyObject d, object baseValue ) : object
CoerceSelectedItem ( DependencyObject d, object value ) : object
CoerceSelectedValue ( DependencyObject d, object value ) : object
ContainsItem ( object item, bool ignoreItemContainerGeneratorStatus, RibbonGalleryCategory &category, RibbonGalleryItem &galleryItem ) : bool
ContainsValue ( object value, bool ignoreItemContainerGeneratorStatus, object &item, RibbonGalleryCategory &category, RibbonGalleryItem &galleryItem ) : bool
DidMouseMove ( System.Windows.Input.MouseEventArgs e ) : bool
FilterCanExecute ( object sender, System.Windows.Input.CanExecuteRoutedEventArgs args ) : void
FilterExecuted ( object sender, System.Windows.Input.ExecutedRoutedEventArgs args ) : void
ForceCoerceHighlightedItem ( ) : void
ForceCoerceSelectedItem ( ) : void
ForceCoerceSelectedValue ( ) : void
GetInnerText ( object item ) : object
GetSelectableValueFromItem ( object item ) : object
GetSelectableValueFromItem ( object item, ContentControl dummyElement ) : object
GetSourceCollectionView ( ItemsControl itemsControl ) : CollectionView
HookCommand ( ICommand command ) : void
IWeakEventListener ( Type managerType, object sender, EventArgs e ) : bool
InvalidateMeasureOnAllCategoriesPanel ( ) : void
IsMinMaxColumnCountValid ( object value ) : bool
MoveCurrentTo ( CollectionView cv, object item ) : void
MoveCurrentToPosition ( CollectionView cv, int position ) : void
OnCanExecuteChanged ( object sender, EventArgs e ) : void
OnCategoryStyleChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnCategoryTemplateChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnCoerceCurrentFilterStyle ( DependencyObject d, object baseValue ) : object
OnCoerceCurrentFilterTemplate ( DependencyObject d, object baseValue ) : object
OnCoerceFilterItemContainerStyleSelector ( DependencyObject d, object baseValue ) : object
OnCoerceFilterItemTemplateSelector ( DependencyObject d, object baseValue ) : object
OnCoerceItemContainerStyle ( DependencyObject d, object baseValue ) : object
OnCoerceItemTemplate ( DependencyObject d, object baseValue ) : object
OnCommandChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnCurrentFilterChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnCurrentFilterTemplateChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnCurrentItemChanged ( ) : void
OnDismissPopup ( RibbonDismissPopupEventArgs e ) : void
OnDismissPopupThunk ( object sender, RibbonDismissPopupEventArgs e ) : void
OnFilterButtonItemContainerGeneratorStatusChanged ( object sender, EventArgs e ) : void
OnFilterItemContainerStyleChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnFilterItemContainerStyleSelectorChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnFilterItemTemplateChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnFilterItemTemplateSelectorChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnHighlightedItemChangedPrivate ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnIsSelectedChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnIsSynchronizedWithCurrentItemChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnItemContainerGeneratorStatusChanged ( object sender, EventArgs e ) : void
OnLayoutPropertyChange ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnLoaded ( object sender, RoutedEventArgs e ) : void
OnMouseMove ( object sender, System.Windows.Input.MouseEventArgs e ) : void
OnNavigationKeyDown ( System.Windows.Input.KeyEventArgs e, DependencyObject focusedElement ) : void
OnNotifyGalleryItemTemplateOrStylePropertyChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnSelectedValuePathChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnSourceCollectionViewCurrentItemChanged ( ) : void
OnUnloaded ( object sender, RoutedEventArgs e ) : void
RemoveCurrentItemChangedListener ( ) : void
RepopulateCategoryFilters ( ) : void
RibbonGallery ( ) : System

Initializes static members of the RibbonGallery class.

SetHeaderBindingForCurrentFilterItem ( ) : void
SetTemplateBindingForCurrentFilterItem ( ) : void
SynchronizeWithCurrentItem ( ) : void
SynchronizeWithCurrentItem ( RibbonGalleryCategory category, object selectedItem ) : void
UnhookCommand ( ICommand command ) : void
UpdateCanExecute ( ) : void
UpdateIsSynchronizedWithCurrentItemInternal ( ) : void

Update the private flag IsSynchronizedWithCurrentItemInternal so that it honor the public property when set and chooses the automatic behavior which is synchornize currency only when bound to an explicit CollectionViewSource.

VerifyEqual ( object knownValue, object itemValue ) : bool
filterMenuButton_Loaded ( object sender, RoutedEventArgs e ) : void

Method Details

ClearContainerForItemOverride() protected method

Called when the container is being detached from the parent ItemsControl
protected ClearContainerForItemOverride ( DependencyObject element, object item ) : void
element System.Windows.DependencyObject
item object
return void

GetContainerForItemOverride() protected method

protected GetContainerForItemOverride ( ) : DependencyObject
return System.Windows.DependencyObject

IsItemItsOwnContainerOverride() protected method

protected IsItemItsOwnContainerOverride ( object item ) : bool
item object
return bool

OnApplyTemplate() public method

public OnApplyTemplate ( ) : void
return void

OnCreateAutomationPeer() protected method

protected OnCreateAutomationPeer ( ) : System.Windows.Automation.Peers.AutomationPeer
return System.Windows.Automation.Peers.AutomationPeer

OnHighlightedItemChanged() protected method

protected OnHighlightedItemChanged ( System.Windows.DependencyPropertyChangedEventArgs e ) : void
e System.Windows.DependencyPropertyChangedEventArgs
return void

OnInitialized() protected method

protected OnInitialized ( EventArgs e ) : void
e System.EventArgs
return void

OnIsKeyboardFocusWithinChanged() protected method

Called when the focus changes within the subtree
protected OnIsKeyboardFocusWithinChanged ( System.Windows.DependencyPropertyChangedEventArgs e ) : void
e System.Windows.DependencyPropertyChangedEventArgs
return void

OnItemsChanged() protected method

This method is invoked when the Items property changes.
protected OnItemsChanged ( NotifyCollectionChangedEventArgs e ) : void
e System.Collections.Specialized.NotifyCollectionChangedEventArgs
return void

OnItemsSourceChanged() protected method

protected OnItemsSourceChanged ( IEnumerable oldValue, IEnumerable newValue ) : void
oldValue IEnumerable
newValue IEnumerable
return void

OnMouseEnter() protected method

protected OnMouseEnter ( System.Windows.Input.MouseEventArgs e ) : void
e System.Windows.Input.MouseEventArgs
return void

OnMouseLeave() protected method

protected OnMouseLeave ( System.Windows.Input.MouseEventArgs e ) : void
e System.Windows.Input.MouseEventArgs
return void

OnPreviewKeyDown() protected method

Gallery's ScrollViewer handles up/down arrow keys and marks the KeyDown event handled even if the next focusable element is not its descendant. The logic here enables navigation to outside the gallery (for e.g. from the last/first galleryItem to gallery's sibling MenuItem).
protected OnPreviewKeyDown ( System.Windows.Input.KeyEventArgs e ) : void
e System.Windows.Input.KeyEventArgs
return void

OnSelectionChanged() protected method

Called when SelectedItem changes. Default implementation fires the SelectionChanged event.
protected OnSelectionChanged ( RoutedPropertyChangedEventArgs e ) : void
e RoutedPropertyChangedEventArgs Event arguments.
return void

PrepareContainerForItemOverride() protected method

Called when the container is being attached to the parent ItemsControl
protected PrepareContainerForItemOverride ( DependencyObject element, object item ) : void
element System.Windows.DependencyObject
item object
return void

ScrollIntoView() public method

This method allows a particular item to be scrolled into view
Note that this method currently does not support the virtualization
public ScrollIntoView ( object item ) : void
item object
return void

Property Details

AllFilterItemContainerStyleProperty public static property

Style to allow customization of the "All" filter item's container.
public static DependencyProperty,System.Windows AllFilterItemContainerStyleProperty
return System.Windows.DependencyProperty

AllFilterItemTemplateProperty public static property

DataTemplate to allow customization of the "All" filter item.
public static DependencyProperty,System.Windows AllFilterItemTemplateProperty
return System.Windows.DependencyProperty

CanAddToQuickAccessToolBarDirectlyProperty public static property

DependencyProperty for CanAddToQuickAccessToolBarDirectly property.
public static DependencyProperty,System.Windows CanAddToQuickAccessToolBarDirectlyProperty
return System.Windows.DependencyProperty

CanUserFilterProperty public static property

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

CategoryStyleProperty public static property

DependencyProperty for the CategoryStyle property.
public static DependencyProperty,System.Windows CategoryStyleProperty
return System.Windows.DependencyProperty

CategoryTemplateProperty public static property

DependencyProperty for the CategoryStyle property.
public static DependencyProperty,System.Windows CategoryTemplateProperty
return System.Windows.DependencyProperty

ColumnsStretchToFillProperty public static property

public static DependencyProperty,System.Windows ColumnsStretchToFillProperty
return System.Windows.DependencyProperty

CommandParameterProperty public static property

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

CommandProperty public static property

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

CommandTargetProperty public static property

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

FilterItemContainerStyleProperty public static property

Style to allow customization of the filter items containers.
public static DependencyProperty,System.Windows FilterItemContainerStyleProperty
return System.Windows.DependencyProperty

FilterItemContainerStyleSelectorProperty public static property

StyleSelector to allow customization of the filter item containers.
public static DependencyProperty,System.Windows FilterItemContainerStyleSelectorProperty
return System.Windows.DependencyProperty

FilterItemTemplateProperty public static property

DataTemplate to allow customization of the filter items.
public static DependencyProperty,System.Windows FilterItemTemplateProperty
return System.Windows.DependencyProperty

FilterItemTemplateSelectorProperty public static property

DataTemplateSelector to allow customization of the filter items.
public static DependencyProperty,System.Windows FilterItemTemplateSelectorProperty
return System.Windows.DependencyProperty

FilterMenuButtonStyleProperty public static property

Style to allow customization of the Filter menu button.
public static DependencyProperty,System.Windows FilterMenuButtonStyleProperty
return System.Windows.DependencyProperty

FilterPaneContentProperty public static property

Object to allow customization of the Filter pane.
public static DependencyProperty,System.Windows FilterPaneContentProperty
return System.Windows.DependencyProperty

FilterPaneContentTemplateProperty public static property

DataTemplate to allow customization of the Filter pane.
public static DependencyProperty,System.Windows FilterPaneContentTemplateProperty
return System.Windows.DependencyProperty

GalleryItemStyleProperty public static property

public static DependencyProperty,System.Windows GalleryItemStyleProperty
return System.Windows.DependencyProperty

GalleryItemTemplateProperty public static property

public static DependencyProperty,System.Windows GalleryItemTemplateProperty
return System.Windows.DependencyProperty

HighlightedItemProperty public static property

The DependencyProperty for the HighlightedItem property. Flags: None Default Value: null
public static DependencyProperty,System.Windows HighlightedItemProperty
return System.Windows.DependencyProperty

IsSharedColumnSizeScopeProperty public static property

IsSharedColumnSizeScope: defined on RibbonGallery. RibbonGalleryCategory also adds itself owner to it. It's a BooleanProperty where True means that I(the control on which property is set) am the Scope for Uniform layout of items. Truth Table for this could be defined by: (gallery.IsSharedColumnScope && !category.ISSharedColumnScope)? Gallery Scope : Category Scope Default Scope must result as Gallery scope hence default value on Gallery is True and on Category it's false.
public static DependencyProperty,System.Windows IsSharedColumnSizeScopeProperty
return System.Windows.DependencyProperty

IsSynchronizedWithCurrentItemProperty public static property

public static DependencyProperty,System.Windows IsSynchronizedWithCurrentItemProperty
return System.Windows.DependencyProperty

MaxColumnCountProperty public static property

MaxColumnCount is the property defined on RibbonGallery. RibbonGalleryCategory also Adds itself Owner to this property. It's used by RibbonGalleryItemsPanel during Measure/Arrange which is default panel for RibbonGalleryCategory Default is int.MaxValue
public static DependencyProperty,System.Windows MaxColumnCountProperty
return System.Windows.DependencyProperty

MinColumnCountProperty public static property

MinColumnCount is the property defined on RibbonGallery. RibbonGalleryCategory also Adds itself Owner to this property. It's used by RibbonGalleryItemsPanel during Measure/Arrange which is default panel for RibbonGalleryCategory Default is 0
public static DependencyProperty,System.Windows MinColumnCountProperty
return System.Windows.DependencyProperty

PreviewCommandParameterProperty public static property

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

QuickAccessToolBarIdProperty public static property

DependencyProperty for QuickAccessToolBarId property.
public static DependencyProperty,System.Windows QuickAccessToolBarIdProperty
return System.Windows.DependencyProperty

RibbonProperty public static property

DependencyProperty for Ribbon property.
public static DependencyProperty,System.Windows RibbonProperty
return System.Windows.DependencyProperty

SelectedItemProperty public static property

The DependencyProperty for the SelectedItem property. Default Value: null
public static DependencyProperty,System.Windows SelectedItemProperty
return System.Windows.DependencyProperty

SelectedValuePathProperty public static property

SelectedValuePath DependencyProperty
public static DependencyProperty,System.Windows SelectedValuePathProperty
return System.Windows.DependencyProperty

SelectedValueProperty public static property

The DependencyProperty for the SelectedValue property. Default Value: null
public static DependencyProperty,System.Windows SelectedValueProperty
return System.Windows.DependencyProperty

SelectionChangedEvent public static property

Event fired when SelectedItem changes.
public static RoutedEvent,System.Windows SelectionChangedEvent
return System.Windows.RoutedEvent

SmallImageSourceProperty public static property

DependencyProperty for SmallImageSource property.
public static DependencyProperty,System.Windows SmallImageSourceProperty
return System.Windows.DependencyProperty

ToolTipDescriptionProperty public static property

DependencyProperty for ToolTipDescription property.
public static DependencyProperty,System.Windows ToolTipDescriptionProperty
return System.Windows.DependencyProperty

ToolTipFooterDescriptionProperty public static property

DependencyProperty for ToolTipFooterDescription property.
public static DependencyProperty,System.Windows ToolTipFooterDescriptionProperty
return System.Windows.DependencyProperty

ToolTipFooterImageSourceProperty public static property

DependencyProperty for ToolTipFooterImageSource property.
public static DependencyProperty,System.Windows ToolTipFooterImageSourceProperty
return System.Windows.DependencyProperty

ToolTipFooterTitleProperty public static property

DependencyProperty for ToolTipFooterTitle property.
public static DependencyProperty,System.Windows ToolTipFooterTitleProperty
return System.Windows.DependencyProperty

ToolTipImageSourceProperty public static property

DependencyProperty for ToolTipImageSource property.
public static DependencyProperty,System.Windows ToolTipImageSourceProperty
return System.Windows.DependencyProperty

ToolTipTitleProperty public static property

DependencyProperty for ToolTipTitle property.
public static DependencyProperty,System.Windows ToolTipTitleProperty
return System.Windows.DependencyProperty