In This Article

BarControlService Class

A service class that provides attached properties that are used throughout the various bar controls.

public class BarControlService
Inheritance:
object object

Properties

Current

Gets the instance of BarControlService for the current thread.

public static BarControlService Current { get; }

Property Value

BarControlService:

An instance of BarControlService for the current thread.

Remarks

The value of this property is thread-specific and should only be accessed from the same thread that created the control which is using the service.

InputGestureDisplayStringProvider

Gets or sets the provider which will be used to determine the display string of a gesture associated with an object (e.g., "Ctrl+C").

public IInputGestureDisplayStringProvider InputGestureDisplayStringProvider { get; set; }

Property Value

IInputGestureDisplayStringProvider:

The IInputGestureDisplayStringProvider to be used. When not defined, a default InputGestureDisplayStringProvider is used.

KeyTipTextGenerator

Gets or sets the key tip text generator which will be used to automatically create key tip text from various sources (e.g., a label).

public static IKeyTipTextGenerator KeyTipTextGenerator { get; set; }

Property Value

IKeyTipTextGenerator:

The IKeyTipTextGenerator to be used. When not defined, a default KeyTipTextGenerator is used.

LabelGenerator

Gets or sets the label generator which will be used to automatically create labels from various sources (e.g., a key).

public static ILabelGenerator LabelGenerator { get; set; }

Property Value

ILabelGenerator:

The ILabelGenerator to be used. When not defined, a default LabelGenerator is used.

Methods

GetAllowContextMenu(DependencyObject)

Gets the value of the AllowContextMenu attached property for the specified object.

public static bool GetAllowContextMenu(DependencyObject obj)
Parameter Type Description
obj DependencyObject

The object from which the property value is read.

Returns

bool:

The object's value.

GetCanCloneToRibbonQuickAccessToolBar(DependencyObject)

Gets the value of the CanCloneToRibbonQuickAccessToolBar attached property for the specified object.

public static bool GetCanCloneToRibbonQuickAccessToolBar(DependencyObject obj)
Parameter Type Description
obj DependencyObject

The object from which the property value is read.

Returns

bool:

The object's value.

GetCanResolveImageSources(DependencyObject)

Gets the value of the CanResolveImageSources attached property for the specified object.

public static bool GetCanResolveImageSources(DependencyObject obj)
Parameter Type Description
obj DependencyObject

The object from which the property value is read.

Returns

bool:

The object's value.

GetCloneToRibbonQuickAccessToolBarStrategy(DependencyObject)

Gets the value of the CloneToRibbonQuickAccessToolBarStrategy attached property for the specified object.

public static CloneToRibbonQuickAccessToolBarStrategy GetCloneToRibbonQuickAccessToolBarStrategy(DependencyObject obj)
Parameter Type Description
obj DependencyObject

The object from which the property value is read.

Returns

CloneToRibbonQuickAccessToolBarStrategy:

The object's value.

GetHasExternalHeader(DependencyObject)

Gets the value of the HasExternalHeader attached property for the specified object.

public static bool GetHasExternalHeader(DependencyObject obj)
Parameter Type Description
obj DependencyObject

The object from which the property value is read.

Returns

bool:

The object's value.

GetHasLabel(DependencyObject)

Gets the value of the HasLabel attached property for the specified object.

public static bool GetHasLabel(DependencyObject obj)
Parameter Type Description
obj DependencyObject

The object from which the property value is read.

Returns

bool:

The object's value.

GetImageSourceResolved(DependencyObject)

Gets the value of the ImageSourceResolved attached property for the specified object.

public static ImageSource GetImageSourceResolved(DependencyObject obj)
Parameter Type Description
obj DependencyObject

The object from which the property value is read.

Returns

ImageSource:

The object's value.

GetInputGestureText(DependencyObject)

Gets the value of the InputGestureText attached property for the specified object.

public static string GetInputGestureText(DependencyObject obj)
Parameter Type Description
obj DependencyObject

The object from which the property value is read.

Returns

string:

The object's value.

GetIsChecked(DependencyObject)

Gets the value of the IsChecked attached property for the specified object.

public static bool GetIsChecked(DependencyObject obj)
Parameter Type Description
obj DependencyObject

The object from which the property value is read.

Returns

bool:

The object's value.

GetIsInRibbonQuickAccessToolBar(DependencyObject)

Gets the value of the IsInRibbonQuickAccessToolBar attached property for the specified object.

public static bool GetIsInRibbonQuickAccessToolBar(DependencyObject obj)
Parameter Type Description
obj DependencyObject

The object from which the property value is read.

Returns

bool:

The object's value.

GetIsInWindowTitleBar(DependencyObject)

Gets the value of the IsInWindowTitleBar attached property for the specified object.

public static bool GetIsInWindowTitleBar(DependencyObject obj)
Parameter Type Description
obj DependencyObject

The object from which the property value is read.

Returns

bool:

The object's value.

GetIsInputGestureTextVisible(DependencyObject)

Gets the value of the IsInputGestureTextVisible attached property for the specified object.

public static bool GetIsInputGestureTextVisible(DependencyObject obj)
Parameter Type Description
obj DependencyObject

The object from which the property value is read.

Returns

bool:

The object's value.

GetIsLabelVisible(DependencyObject)

Gets the value of the IsLabelVisible attached property for the specified object.

public static bool GetIsLabelVisible(DependencyObject obj)
Parameter Type Description
obj DependencyObject

The object from which the property value is read.

Returns

bool:

The object's value.

GetIsMenuControl(DependencyObject)

Gets the value of the IsMenuControl attached property for the specified object.

public static bool GetIsMenuControl(DependencyObject obj)
Parameter Type Description
obj DependencyObject

The object from which the property value is read.

Returns

bool:

The object's value.

GetIsMenuItemHost(DependencyObject)

Gets the value of the IsMenuItemHost attached property for the specified object.

public static bool GetIsMenuItemHost(DependencyObject obj)
Parameter Type Description
obj DependencyObject

The object from which the property value is read.

Returns

bool:

The object's value.

GetIsOverflowMenuItemHost(DependencyObject)

Gets the value of the IsOverflowMenuItemHost attached property for the specified object.

public static bool GetIsOverflowMenuItemHost(DependencyObject obj)
Parameter Type Description
obj DependencyObject

The object from which the property value is read.

Returns

bool:

The object's value.

GetIsVerticalLayoutOrientationSupported(DependencyObject)

Gets the value of the IsVerticalLayoutOrientationSupported attached property for the specified object.

public static bool GetIsVerticalLayoutOrientationSupported(DependencyObject obj)
Parameter Type Description
obj DependencyObject

The object from which the property value is read.

Returns

bool:

The object's value.

GetItemContainerTemplateSelector(DependencyObject)

Gets the value of the ItemContainerTemplateSelector attached property for the specified object.

public static ItemContainerTemplateSelector GetItemContainerTemplateSelector(DependencyObject obj)
Parameter Type Description
obj DependencyObject

The object from which the property value is read.

Returns

ItemContainerTemplateSelector:

The object's value.

GetItemLayoutOrientation(DependencyObject)

Gets the value of the ItemLayoutOrientation attached property for the specified object.

public static Orientation GetItemLayoutOrientation(DependencyObject obj)
Parameter Type Description
obj DependencyObject

The object from which the property value is read.

Returns

Orientation:

The object's value.

GetKey(DependencyObject)

Gets the value of the Key attached property for the specified object.

public static string GetKey(DependencyObject obj)
Parameter Type Description
obj DependencyObject

The object from which the property value is read.

Returns

string:

The object's value.

GetLabel(DependencyObject)

Gets the value of the Label attached property for the specified object.

public static string GetLabel(DependencyObject obj)
Parameter Type Description
obj DependencyObject

The object from which the property value is read.

Returns

string:

The object's value.

GetLargeImageSource(DependencyObject)

Gets the value of the LargeImageSource attached property for the specified object.

public static ImageSource GetLargeImageSource(DependencyObject obj)
Parameter Type Description
obj DependencyObject

The object from which the property value is read.

Returns

ImageSource:

The object's value.

GetMediumImageSource(DependencyObject)

Gets the value of the MediumImageSource attached property for the specified object.

public static ImageSource GetMediumImageSource(DependencyObject obj)
Parameter Type Description
obj DependencyObject

The object from which the property value is read.

Returns

ImageSource:

The object's value.

GetPanelSpacingSuggestion(DependencyObject)

Gets the value of the PanelSpacingSuggestion attached property for the specified object.

public static PanelSpacingSuggestion GetPanelSpacingSuggestion(DependencyObject obj)
Parameter Type Description
obj DependencyObject

The object from which the property value is read.

Returns

PanelSpacingSuggestion:

The object's value.

GetRootBarControl(DependencyObject)

Gets the value of the RootBarControl attached property for the specified object.

public static IRootBarControl GetRootBarControl(DependencyObject obj)
Parameter Type Description
obj DependencyObject

The object from which the property value is read.

Returns

IRootBarControl:

The object's value.

GetSmallImageSource(DependencyObject)

Gets the value of the SmallImageSource attached property for the specified object.

public static ImageSource GetSmallImageSource(DependencyObject obj)
Parameter Type Description
obj DependencyObject

The object from which the property value is read.

Returns

ImageSource:

The object's value.

GetTitle(DependencyObject)

Gets the value of the Title attached property for the specified object.

public static string GetTitle(DependencyObject obj)
Parameter Type Description
obj DependencyObject

The object from which the property value is read.

Returns

string:

The object's value.

GetToolBarItemCollapseBehavior(DependencyObject)

Gets the value of the ToolBarItemCollapseBehavior attached property for the specified object.

public static ItemCollapseBehavior GetToolBarItemCollapseBehavior(DependencyObject obj)
Parameter Type Description
obj DependencyObject

The object from which the property value is read.

Returns

ItemCollapseBehavior:

The object's value.

GetToolBarItemVariantBehavior(DependencyObject)

Gets the value of the ToolBarItemVariantBehavior attached property for the specified object.

public static ItemVariantBehavior GetToolBarItemVariantBehavior(DependencyObject obj)
Parameter Type Description
obj DependencyObject

The object from which the property value is read.

Returns

ItemVariantBehavior:

The object's value.

GetVariantSize(DependencyObject)

Gets the value of the VariantSize attached property for the specified object.

public static VariantSize GetVariantSize(DependencyObject obj)
Parameter Type Description
obj DependencyObject

The object from which the property value is read.

Returns

VariantSize:

The object's value.

SetAllowContextMenu(DependencyObject, bool)

Sets the value of the AllowContextMenu attached property to the specified object.

public static void SetAllowContextMenu(DependencyObject obj, bool value)
Parameter Type Description
obj DependencyObject

The object to which the attached property is written.

value bool

The value to set.

SetCanCloneToRibbonQuickAccessToolBar(DependencyObject, bool)

Sets the value of the CanCloneToRibbonQuickAccessToolBar attached property to the specified object.

public static void SetCanCloneToRibbonQuickAccessToolBar(DependencyObject obj, bool value)
Parameter Type Description
obj DependencyObject

The object to which the attached property is written.

value bool

The value to set.

SetCanResolveImageSources(DependencyObject, bool)

Sets the value of the CanResolveImageSources attached property to the specified object.

public static void SetCanResolveImageSources(DependencyObject obj, bool value)
Parameter Type Description
obj DependencyObject

The object to which the attached property is written.

value bool

The value to set.

SetCloneToRibbonQuickAccessToolBarStrategy(DependencyObject, CloneToRibbonQuickAccessToolBarStrategy)

Sets the value of the CloneToRibbonQuickAccessToolBarStrategy attached property to the specified object.

public static void SetCloneToRibbonQuickAccessToolBarStrategy(DependencyObject obj, CloneToRibbonQuickAccessToolBarStrategy value)
Parameter Type Description
obj DependencyObject

The object to which the attached property is written.

value CloneToRibbonQuickAccessToolBarStrategy

The value to set.

SetHasExternalHeader(DependencyObject, bool)

Sets the value of the HasExternalHeader attached property to the specified object.

public static void SetHasExternalHeader(DependencyObject obj, bool value)
Parameter Type Description
obj DependencyObject

The object to which the attached property is written.

value bool

The value to set.

SetInputGestureText(DependencyObject, string)

Sets the value of the InputGestureText attached property to the specified object.

public static void SetInputGestureText(DependencyObject obj, string value)
Parameter Type Description
obj DependencyObject

The object to which the attached property is written.

value string

The value to set.

SetIsChecked(DependencyObject, bool)

Sets the value of the IsChecked attached property to the specified object.

public static void SetIsChecked(DependencyObject obj, bool value)
Parameter Type Description
obj DependencyObject

The object to which the attached property is written.

value bool

The value to set.

SetIsInWindowTitleBar(DependencyObject, bool)

Sets the value of the IsInWindowTitleBar attached property to the specified object.

public static void SetIsInWindowTitleBar(DependencyObject obj, bool value)
Parameter Type Description
obj DependencyObject

The object to which the attached property is written.

value bool

The value to set.

SetIsInputGestureTextVisible(DependencyObject, bool)

Sets the value of the IsInputGestureTextVisible attached property to the specified object.

public static void SetIsInputGestureTextVisible(DependencyObject obj, bool value)
Parameter Type Description
obj DependencyObject

The object to which the attached property is written.

value bool

The value to set.

SetIsLabelVisible(DependencyObject, bool)

Sets the value of the IsLabelVisible attached property to the specified object.

public static void SetIsLabelVisible(DependencyObject obj, bool value)
Parameter Type Description
obj DependencyObject

The object to which the attached property is written.

value bool

The value to set.

SetIsMenuControl(DependencyObject, bool)

Sets the value of the IsMenuControl attached property to the specified object.

public static void SetIsMenuControl(DependencyObject obj, bool value)
Parameter Type Description
obj DependencyObject

The object to which the attached property is written.

value bool

The value to set.

SetIsMenuItemHost(DependencyObject, bool)

Sets the value of the IsMenuItemHost attached property to the specified object.

public static void SetIsMenuItemHost(DependencyObject obj, bool value)
Parameter Type Description
obj DependencyObject

The object to which the attached property is written.

value bool

The value to set.

SetIsOverflowMenuItemHost(DependencyObject, bool)

Sets the value of the IsOverflowMenuItemHost attached property to the specified object.

public static void SetIsOverflowMenuItemHost(DependencyObject obj, bool value)
Parameter Type Description
obj DependencyObject

The object to which the attached property is written.

value bool

The value to set.

SetIsVerticalLayoutOrientationSupported(DependencyObject, bool)

Sets the value of the IsVerticalLayoutOrientationSupported attached property to the specified object.

public static void SetIsVerticalLayoutOrientationSupported(DependencyObject obj, bool value)
Parameter Type Description
obj DependencyObject

The object to which the attached property is written.

value bool

The value to set.

SetItemContainerTemplateSelector(DependencyObject, ItemContainerTemplateSelector)

Sets the value of the ItemContainerTemplateSelector attached property to the specified object.

public static void SetItemContainerTemplateSelector(DependencyObject obj, ItemContainerTemplateSelector value)
Parameter Type Description
obj DependencyObject

The object to which the attached property is written.

value ItemContainerTemplateSelector

The value to set.

SetItemLayoutOrientation(DependencyObject, Orientation)

Sets the value of the ItemLayoutOrientation attached property to the specified object.

public static void SetItemLayoutOrientation(DependencyObject obj, Orientation value)
Parameter Type Description
obj DependencyObject

The object to which the attached property is written.

value Orientation

The value to set.

SetKey(DependencyObject, string)

Sets the value of the Key attached property to the specified object.

public static void SetKey(DependencyObject obj, string value)
Parameter Type Description
obj DependencyObject

The object to which the attached property is written.

value string

The value to set.

SetLabel(DependencyObject, string)

Sets the value of the Label attached property to the specified object.

public static void SetLabel(DependencyObject obj, string value)
Parameter Type Description
obj DependencyObject

The object to which the attached property is written.

value string

The value to set.

SetLargeImageSource(DependencyObject, ImageSource)

Sets the value of the LargeImageSource attached property to the specified object.

public static void SetLargeImageSource(DependencyObject obj, ImageSource value)
Parameter Type Description
obj DependencyObject

The object to which the attached property is written.

value ImageSource

The value to set.

SetMediumImageSource(DependencyObject, ImageSource)

Sets the value of the MediumImageSource attached property to the specified object.

public static void SetMediumImageSource(DependencyObject obj, ImageSource value)
Parameter Type Description
obj DependencyObject

The object to which the attached property is written.

value ImageSource

The value to set.

SetPanelSpacingSuggestion(DependencyObject, PanelSpacingSuggestion)

Sets the value of the PanelSpacingSuggestion attached property to the specified object.

public static void SetPanelSpacingSuggestion(DependencyObject obj, PanelSpacingSuggestion value)
Parameter Type Description
obj DependencyObject

The object to which the attached property is written.

value PanelSpacingSuggestion

The value to set.

SetRootBarControl(DependencyObject, IRootBarControl)

Sets the value of the RootBarControl attached property to the specified object.

public static void SetRootBarControl(DependencyObject obj, IRootBarControl value)
Parameter Type Description
obj DependencyObject

The object to which the attached property is written.

value IRootBarControl

The value to set.

SetSmallImageSource(DependencyObject, ImageSource)

Sets the value of the SmallImageSource attached property to the specified object.

public static void SetSmallImageSource(DependencyObject obj, ImageSource value)
Parameter Type Description
obj DependencyObject

The object to which the attached property is written.

value ImageSource

The value to set.

SetTitle(DependencyObject, string)

Sets the value of the Title attached property to the specified object.

public static void SetTitle(DependencyObject obj, string value)
Parameter Type Description
obj DependencyObject

The object to which the attached property is written.

value string

The value to set.

SetToolBarItemCollapseBehavior(DependencyObject, ItemCollapseBehavior)

Sets the value of the ToolBarItemCollapseBehavior attached property to the specified object.

public static void SetToolBarItemCollapseBehavior(DependencyObject obj, ItemCollapseBehavior value)
Parameter Type Description
obj DependencyObject

The object to which the attached property is written.

value ItemCollapseBehavior

The value to set.

SetToolBarItemVariantBehavior(DependencyObject, ItemVariantBehavior)

Sets the value of the ToolBarItemVariantBehavior attached property to the specified object.

public static void SetToolBarItemVariantBehavior(DependencyObject obj, ItemVariantBehavior value)
Parameter Type Description
obj DependencyObject

The object to which the attached property is written.

value ItemVariantBehavior

The value to set.

SetVariantSize(DependencyObject, VariantSize)

Sets the value of the VariantSize attached property to the specified object.

public static void SetVariantSize(DependencyObject obj, VariantSize value)
Parameter Type Description
obj DependencyObject

The object to which the attached property is written.

value VariantSize

The value to set.

Fields

AllowContextMenuProperty

Identifies the AllowContextMenu dependency property. This field is read-only.

public static readonly DependencyProperty AllowContextMenuProperty

CanCloneToRibbonQuickAccessToolBarProperty

Identifies the CanCloneToRibbonQuickAccessToolBar dependency property. This field is read-only.

public static readonly DependencyProperty CanCloneToRibbonQuickAccessToolBarProperty

CanResolveImageSourcesProperty

Identifies the CanResolveImageSources dependency property. This field is read-only.

public static readonly DependencyProperty CanResolveImageSourcesProperty

CloneToRibbonQuickAccessToolBarStrategyProperty

Identifies the CloneToRibbonQuickAccessToolBarStrategy dependency property. This field is read-only.

public static readonly DependencyProperty CloneToRibbonQuickAccessToolBarStrategyProperty

HasExternalHeaderProperty

Identifies the HasExternalHeader dependency property. This field is read-only.

public static readonly DependencyProperty HasExternalHeaderProperty

HasLabelProperty

Identifies the HasLabel dependency property. This field is read-only.

public static readonly DependencyProperty HasLabelProperty

ImageSourceResolvedProperty

Identifies the ImageSourceResolved dependency property. This field is read-only.

public static readonly DependencyProperty ImageSourceResolvedProperty

InputGestureTextProperty

Identifies the InputGestureText dependency property. This field is read-only.

public static readonly DependencyProperty InputGestureTextProperty

IsCheckedProperty

Identifies the IsChecked dependency property. This field is read-only.

public static readonly DependencyProperty IsCheckedProperty

IsInRibbonQuickAccessToolBarProperty

Identifies the IsInRibbonQuickAccessToolBar dependency property. This field is read-only.

public static readonly DependencyProperty IsInRibbonQuickAccessToolBarProperty

IsInWindowTitleBarProperty

Identifies the IsInWindowTitleBar dependency property. This field is read-only.

public static readonly DependencyProperty IsInWindowTitleBarProperty

IsInputGestureTextVisibleProperty

Identifies the IsInputGestureTextVisible dependency property. This field is read-only.

public static readonly DependencyProperty IsInputGestureTextVisibleProperty

IsLabelVisibleProperty

Identifies the IsLabelVisible dependency property. This field is read-only.

public static readonly DependencyProperty IsLabelVisibleProperty

IsMenuControlProperty

Identifies the IsMenuControl dependency property. This field is read-only.

public static readonly DependencyProperty IsMenuControlProperty

IsMenuItemHostProperty

Identifies the IsMenuItemHost dependency property. This field is read-only.

public static readonly DependencyProperty IsMenuItemHostProperty

IsOverflowMenuItemHostProperty

Identifies the IsOverflowMenuItemHost dependency property. This field is read-only.

public static readonly DependencyProperty IsOverflowMenuItemHostProperty

IsVerticalLayoutOrientationSupportedProperty

Identifies the IsVerticalLayoutOrientationSupported dependency property. This field is read-only.

public static readonly DependencyProperty IsVerticalLayoutOrientationSupportedProperty

ItemContainerTemplateSelectorProperty

Identifies the ItemContainerTemplateSelector dependency property. This field is read-only.

public static readonly DependencyProperty ItemContainerTemplateSelectorProperty

ItemLayoutOrientationProperty

Identifies the ItemLayoutOrientation dependency property. This field is read-only.

public static readonly DependencyProperty ItemLayoutOrientationProperty

KeyProperty

Identifies the Key dependency property. This field is read-only.

public static readonly DependencyProperty KeyProperty

LabelProperty

Identifies the Label dependency property. This field is read-only.

public static readonly DependencyProperty LabelProperty

LargeImageSourceProperty

Identifies the LargeImageSource dependency property. This field is read-only.

public static readonly DependencyProperty LargeImageSourceProperty

MediumImageSourceProperty

Identifies the MediumImageSource dependency property. This field is read-only.

public static readonly DependencyProperty MediumImageSourceProperty

PanelSpacingSuggestionProperty

Identifies the PanelSpacingSuggestion dependency property. This field is read-only.

public static readonly DependencyProperty PanelSpacingSuggestionProperty

RootBarControlProperty

Identifies the RootBarControl dependency property. This field is read-only.

public static readonly DependencyProperty RootBarControlProperty

SmallImageSourceProperty

Identifies the SmallImageSource dependency property. This field is read-only.

public static readonly DependencyProperty SmallImageSourceProperty

TitleProperty

Identifies the Title dependency property. This field is read-only.

public static readonly DependencyProperty TitleProperty

ToolBarItemCollapseBehaviorProperty

Identifies the ToolBarItemCollapseBehavior dependency property. This field is read-only.

public static readonly DependencyProperty ToolBarItemCollapseBehaviorProperty

ToolBarItemVariantBehaviorProperty

Identifies the ToolBarItemVariantBehavior dependency property. This field is read-only.

public static readonly DependencyProperty ToolBarItemVariantBehaviorProperty

VariantSizeProperty

Identifies the VariantSize dependency property. This field is read-only.

public static readonly DependencyProperty VariantSizeProperty

Inherited Members