RibbonBackstage Class
Represents a Backstage control for a ActiproSoftware.Windows.Controls.Bars.RibbonBackstage.Ribbon, activated by an application button.
[TemplatePart(Name = "PART_CloseButton", Type = typeof(RibbonBackstageCloseButton))]
[TemplatePart(Name = "PART_HeaderPanel", Type = typeof(Panel))]
[TemplatePart(Name = "PART_OverflowPresenter", Type = typeof(OverflowPresenter))]
[TemplatePart(Name = "PART_SelectedContentHost", Type = typeof(ContentPresenter))]
[TemplatePart(Name = "PART_TabSelectionElement", Type = typeof(FrameworkElement))]
public class RibbonBackstage : TabControl
- Inheritance:
- object Visual UIElement FrameworkElement Control ItemsControl Selector TabControl object
Constructors
RibbonBackstage()
Initializes an instance of the class.
public RibbonBackstage()
Properties
CanClose
Indicates whether the Backstage close button should be visible, and whether Esc can close Backstage.
public bool CanClose { get; set; }
Property Value
- bool:
trueif the Backstage close button should be visible, and whetherEsccan close Backstage; otherwise,false. The default value istrue.
Remarks
This feature is useful for scenarios where there is no document open in the main window yet, and Backstage is open, allowing for an end user to select a new document or open a document. In this scenario, you don't want the end user to be able to close Backstage until they take some action.
CanSelectFirstTabOnOpen
Indicates whether the first tab should be selected when the Backstage is opened.
public bool CanSelectFirstTabOnOpen { get; set; }
Property Value
- bool:
trueif the first tab should be selected when the Backstage is opened; otherwise,false. The default value istrue.
CloseCommand
The ICommand that closes the Backstage.
CornerRadius
The corner radius of the control's border.
HeaderBackground
The Brush to use for the header's background.
IsBackdropActive
Indicates whether the system backdrop is being rendered in the background.
public bool IsBackdropActive { get; }
Property Value
- bool:
trueif the system backdrop is being rendered in the background; otherwise,false.
IsCloseButtonVisible
Indicates whether the close button is visible.
public bool IsCloseButtonVisible { get; }
Property Value
- bool:
trueif the close button is visible; otherwise,false.
IsOpen
Indicates whether Backstage is open.
MaxHeaderWidth
The maximum header width.
MinHeaderWidth
The minimum header width.
TitleBarHeight
The title bar height.
Methods
ArrangeOverride(Size)
Called to arrange and size the content of a Control object.
protected override Size ArrangeOverride(Size finalSize)
| Parameter | Type | Description |
|---|---|---|
| finalSize | Size |
Returns
- Size:
The size of the control.
ClearContainerForItemOverride(DependencyObject, object)
Returns an item container to the state it was in before PrepareContainerForItemOverride(DependencyObject, object).
protected override void ClearContainerForItemOverride(DependencyObject element, object item)
| Parameter | Type | Description |
|---|---|---|
| element | DependencyObject | The item container element. |
| item | object | The data item. |
GetContainerForItemOverride()
Creates or identifies the element used to display the specified item.
protected override DependencyObject GetContainerForItemOverride()
Returns
- DependencyObject:
The element used to display the specified item.
GetHeaderAlignment(DependencyObject)
Gets the value of the HeaderAlignment attached property for the specified object.
[AttachedPropertyBrowsableForChildren]
public static RibbonBackstageHeaderAlignment GetHeaderAlignment(DependencyObject obj)
| Parameter | Type | Description |
|---|---|---|
| obj | DependencyObject | The object from which the property value is read. |
Returns
IsItemItsOwnContainerOverride(object)
Determines if the specified item is (or is eligible to be) its own ItemContainer.
protected override bool IsItemItsOwnContainerOverride(object item)
| Parameter | Type | Description |
|---|---|---|
| item | object | Specified item. |
Returns
- bool:
Returns
trueif the item is its ownItemContainer; otherwise,false.
OnApplyTemplate()
Called when ApplyTemplate() is called.
public override void OnApplyTemplate()
OnCreateAutomationPeer()
Provides an appropriate TabControlAutomationPeer implementation for this control, as part of the WPF automation infrastructure.
protected override AutomationPeer OnCreateAutomationPeer()
Returns
- AutomationPeer:
The type-specific AutomationPeer implementation.
OnIsKeyboardFocusWithinChanged(DependencyPropertyChangedEventArgs)
Called when the IsKeyboardFocusWithin property has changed.
protected override void OnIsKeyboardFocusWithinChanged(DependencyPropertyChangedEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | DependencyPropertyChangedEventArgs | The event data. |
OnIsOpenChanged(RoutedEventArgs)
Occurs after the IsOpen property has changed.
protected virtual void OnIsOpenChanged(RoutedEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | RoutedEventArgs | The event data. |
OnKeyDown(KeyEventArgs)
Provides class handling for the KeyDown routed event that occurs when the user presses a key.
protected override void OnKeyDown(KeyEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | KeyEventArgs | Provides data for KeyEventArgs. |
OnMouseLeftButtonDown(MouseButtonEventArgs)
Invoked when an unhandled MouseLeftButtonDown routed event is raised on this element. Implement this method to add class handling for this event.
protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | MouseButtonEventArgs | The MouseButtonEventArgs that contains the event data. The event data reports that the left mouse button was pressed. |
OnMouseWheel(MouseWheelEventArgs)
Invoked when an unhandled System.Windows.Input.Mouse.MouseWheel attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
protected override void OnMouseWheel(MouseWheelEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | MouseWheelEventArgs | The MouseWheelEventArgs that contains the event data. |
OnSelectionChanged(SelectionChangedEventArgs)
Raises the SelectionChanged routed event.
protected override void OnSelectionChanged(SelectionChangedEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | SelectionChangedEventArgs | Provides data for SelectionChangedEventArgs. |
PrepareContainerForItemOverride(DependencyObject, object)
Prepares the specified element to display the specified item.
protected override void PrepareContainerForItemOverride(DependencyObject element, object item)
| Parameter | Type | Description |
|---|---|---|
| element | DependencyObject | The element that is used to display the specified item. |
| item | object | The specified item to display. |
SetHeaderAlignment(DependencyObject, RibbonBackstageHeaderAlignment)
Sets the value of the HeaderAlignment attached property to the specified object.
public static void SetHeaderAlignment(DependencyObject obj, RibbonBackstageHeaderAlignment value)
| Parameter | Type | Description |
|---|---|---|
| obj | DependencyObject | The object to which the attached property is written. |
| value | RibbonBackstageHeaderAlignment | The value to set. |
Events
IsOpenChanged
Occurs after the IsOpen property has changed.
Fields
CanCloseProperty
Defines the CanClose property.
public static readonly DependencyProperty CanCloseProperty
CanSelectFirstTabOnOpenProperty
Defines the CanSelectFirstTabOnOpen property.
public static readonly DependencyProperty CanSelectFirstTabOnOpenProperty
CornerRadiusProperty
Defines the CornerRadius property.
public static readonly DependencyProperty CornerRadiusProperty
HeaderAlignmentProperty
Defines the HeaderAlignment property.
public static readonly DependencyProperty HeaderAlignmentProperty
HeaderBackgroundProperty
Defines the HeaderBackground property.
public static readonly DependencyProperty HeaderBackgroundProperty
IsBackdropActiveProperty
Defines the IsBackdropActive property.
public static readonly DependencyProperty IsBackdropActiveProperty
IsCloseButtonVisibleProperty
Defines the IsCloseButtonVisible property.
public static readonly DependencyProperty IsCloseButtonVisibleProperty
IsOpenChangedEvent
Defines the IsOpenChanged routed event.
public static readonly RoutedEvent IsOpenChangedEvent
IsOpenProperty
Defines the IsOpen property.
public static readonly DependencyProperty IsOpenProperty
MaxHeaderWidthProperty
Defines the MaxHeaderWidth property.
public static readonly DependencyProperty MaxHeaderWidthProperty
MinHeaderWidthProperty
Defines the MinHeaderWidth property.
public static readonly DependencyProperty MinHeaderWidthProperty
TitleBarHeightProperty
Defines the TitleBarHeight property.
public static readonly DependencyProperty TitleBarHeightProperty