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 a new instance of the RibbonBackstage class.
public RibbonBackstage()
Properties
CanClose
Gets or sets whether the Backstage close button should be visible, and whether Esc
can close Backstage.
public bool CanClose { get; set; }
Property Value
- bool:
true
if the Backstage close button should be visible, and whetherEsc
can 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
Gets or sets whether the first tab should be selected when the Backstage is opened.
public bool CanSelectFirstTabOnOpen { get; set; }
Property Value
- bool:
true
if the first tab should be selected when the Backstage is opened; otherwise,false
. The default value istrue
.
CloseCommand
Gets the ICommand that closes the Backstage.
CornerRadius
Gets or sets the corner radius of the control's border.
public CornerRadius CornerRadius { get; set; }
Property Value
- CornerRadius:
The corner radius of the control's border.
HeaderBackground
Gets or sets the Brush to use for the header's background.
public Brush HeaderBackground { get; set; }
Property Value
IsBackdropActive
Gets whether the system backdrop is being rendered in the background.
public bool IsBackdropActive { get; }
Property Value
- bool:
true
if the system backdrop is being rendered in the background; otherwise,false
.
IsCloseButtonVisible
Gets whether the close button is visible.
public bool IsCloseButtonVisible { get; }
Property Value
- bool:
true
if the close button is visible; otherwise,false
.
IsOpen
Gets or sets whether Backstage is open.
MaxHeaderWidth
Gets or sets the maximum header width.
public double MaxHeaderWidth { get; set; }
Property Value
- double:
The maximum header width. The default value is
180
.
MinHeaderWidth
Gets or sets the minimum header width.
public double MinHeaderWidth { get; set; }
Property Value
- double:
The minimum header width. The default value is
140
.
TitleBarHeight
Gets 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
- RibbonBackstageHeaderAlignment:
The object's value.
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
true
if 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 RoutedEventArgs that contains 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
Identifies the CanClose dependency property. This field is read-only.
public static readonly DependencyProperty CanCloseProperty
CanSelectFirstTabOnOpenProperty
Identifies the CanSelectFirstTabOnOpen dependency property. This field is read-only.
public static readonly DependencyProperty CanSelectFirstTabOnOpenProperty
CornerRadiusProperty
Identifies the CornerRadius dependency property. This field is read-only.
public static readonly DependencyProperty CornerRadiusProperty
HeaderAlignmentProperty
Identifies the HeaderAlignment
dependency property. This field is read-only.
public static readonly DependencyProperty HeaderAlignmentProperty
HeaderBackgroundProperty
Identifies the HeaderBackground dependency property. This field is read-only.
public static readonly DependencyProperty HeaderBackgroundProperty
IsBackdropActiveProperty
Identifies the IsBackdropActive dependency property. This field is read-only.
public static readonly DependencyProperty IsBackdropActiveProperty
IsCloseButtonVisibleProperty
Identifies the IsCloseButtonVisible dependency property. This field is read-only.
public static readonly DependencyProperty IsCloseButtonVisibleProperty
IsOpenChangedEvent
Identifies the IsOpenChanged routed event. This field is read-only.
public static readonly RoutedEvent IsOpenChangedEvent
IsOpenProperty
Identifies the IsOpen dependency property. This field is read-only.
public static readonly DependencyProperty IsOpenProperty
MaxHeaderWidthProperty
Identifies the MaxHeaderWidth dependency property. This field is read-only.
public static readonly DependencyProperty MaxHeaderWidthProperty
MinHeaderWidthProperty
Identifies the MinHeaderWidth dependency property. This field is read-only.
public static readonly DependencyProperty MinHeaderWidthProperty
TitleBarHeightProperty
Identifies the TitleBarHeight dependency property. This field is read-only.
public static readonly DependencyProperty TitleBarHeightProperty