In This Article

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, DUCE.IResource, IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IHaveResources, IQueryAmbient, IAddChild, IGeneratorHost, IContainItemStorage
Inheritance:
System.Object System.Windows.Threading.DispatcherObject System.Windows.DependencyObject System.Windows.Media.Visual System.Windows.UIElement System.Windows.FrameworkElement System.Windows.Controls.Control System.Windows.Controls.ItemsControl System.Windows.Controls.Primitives.Selector System.Windows.Controls.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

System.Boolean:

true if the Backstage close button should be visible, and whether Esc can close Backstage; otherwise, false. The default value is true.

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.

CloseCommand

Gets the System.Windows.Input.ICommand that closes the Backstage.

public ICommand CloseCommand { get; }

Property Value

System.Windows.Input.ICommand

CornerRadius

Gets or sets the corner radius of the control's border.

public CornerRadius CornerRadius { get; set; }

Property Value

System.Windows.CornerRadius:

The corner radius of the control's border.

HeaderBackground

Gets or sets the System.Windows.Media.Brush to use for the header's background.

public Brush HeaderBackground { get; set; }

Property Value

System.Windows.Media.Brush:

The System.Windows.Media.Brush to use for the header's background.

IsBackdropActive

Gets whether the system backdrop is being rendered in the background.

public bool IsBackdropActive { get; }

Property Value

System.Boolean:

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

System.Boolean:

true if the close button is visible; otherwise, false.

IsOpen

Gets or sets whether Backstage is open.

public bool IsOpen { get; set; }

Property Value

System.Boolean:

true if Backstage is open; otherwise, false.

MaxHeaderWidth

Gets or sets the maximum header width.

public double MaxHeaderWidth { get; set; }

Property Value

System.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

System.Double:

The minimum header width. The default value is 140.

TitleBarHeight

Gets the title bar height.

public double TitleBarHeight { get; }

Property Value

System.Double:

The title bar height.

Methods

ArrangeOverride(Size)

Called to arrange and size the content of a System.Windows.Controls.Control object.

protected override Size ArrangeOverride(Size finalSize)
Parameter Type Description
finalSize System.Windows.Size

Returns

System.Windows.Size:

The size of the control.

ClearContainerForItemOverride(DependencyObject, Object)

Returns an item container to the state it was in before System.Windows.Controls.ItemsControl.PrepareContainerForItemOverride(System.Windows.DependencyObject, System.Object).

protected override void ClearContainerForItemOverride(DependencyObject element, object item)
Parameter Type Description
element System.Windows.DependencyObject

The item container element.

item System.Object

The data item.

GetContainerForItemOverride()

Creates or identifies the element used to display the specified item.

protected override DependencyObject GetContainerForItemOverride()

Returns

System.Windows.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 System.Windows.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 System.Object

Specified item.

Returns

System.Boolean:

Returns true if the item is its own ItemContainer; otherwise, false.

OnApplyTemplate()

Called when ApplyTemplate() is called.

public override void OnApplyTemplate()

OnCreateAutomationPeer()

Provides an appropriate System.Windows.Automation.Peers.TabControlAutomationPeer implementation for this control, as part of the WPF automation infrastructure.

protected override AutomationPeer OnCreateAutomationPeer()

Returns

System.Windows.Automation.Peers.AutomationPeer:

The type-specific System.Windows.Automation.Peers.AutomationPeer implementation.

OnIsKeyboardFocusWithinChanged(DependencyPropertyChangedEventArgs)

Called when the IsKeyboardFocusWithin property has changed.

protected override void OnIsKeyboardFocusWithinChanged(DependencyPropertyChangedEventArgs e)
Parameter Type Description
e System.Windows.DependencyPropertyChangedEventArgs

The event data.

OnIsOpenChanged(RoutedEventArgs)

Occurs after the IsOpen property has changed.

protected virtual void OnIsOpenChanged(RoutedEventArgs e)
Parameter Type Description
e System.Windows.RoutedEventArgs

The System.Windows.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 System.Windows.Input.KeyEventArgs

Provides data for System.Windows.Input.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 System.Windows.Input.MouseButtonEventArgs

The System.Windows.Input.MouseButtonEventArgs that contains the event data. The event data reports that the left mouse button was pressed.

OnMouseWheel(MouseWheelEventArgs)

Invoked when an unhandled 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 System.Windows.Input.MouseWheelEventArgs

The System.Windows.Input.MouseWheelEventArgs that contains the event data.

OnSelectionChanged(SelectionChangedEventArgs)

Raises the SelectionChanged routed event.

protected override void OnSelectionChanged(SelectionChangedEventArgs e)
Parameter Type Description
e System.Windows.Controls.SelectionChangedEventArgs

Provides data for System.Windows.Controls.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 System.Windows.DependencyObject

The element that is used to display the specified item.

item System.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 System.Windows.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.

public event RoutedEventHandler IsOpenChanged

Event Type

System.Windows.RoutedEventHandler

Fields

CanCloseProperty

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

public static readonly DependencyProperty CanCloseProperty

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

Inherited Members

  • System.Object.ToString()
  • System.Object.Equals(System.Object)
  • System.Object.Equals(System.Object, System.Object)
  • System.Object.ReferenceEquals(System.Object, System.Object)
  • System.Object.GetHashCode()
  • System.Object.GetType()
  • System.Object.MemberwiseClone()

Extension Methods