In This Article

RibbonWindowTitleBarText Class

Represents a RibbonWindow title bar text control.

public class RibbonWindowTitleBarText : FrameworkElement
Inheritance:
object Visual UIElement FrameworkElement object

Constructors

RibbonWindowTitleBarText()

Initializes an instance of the class.

public RibbonWindowTitleBarText()

Properties

ApplicationName

Gets or sets the name of the application.

[Localizability(LocalizationCategory.Title)]
public string ApplicationName { get; set; }

Property Value

string:

The name of the application.

DocumentName

Gets or sets the name of the current document, if any.

[Localizability(LocalizationCategory.Title)]
public string DocumentName { get; set; }

Property Value

string:

The name of the current document, if any.

HorizontalContentAlignment

Gets or sets the HorizontalAlignment of the text.

public HorizontalAlignment HorizontalContentAlignment { get; set; }

Property Value

HorizontalAlignment:

The HorizontalAlignment of the text.

Padding

Gets or sets the padding around the text.

public Thickness Padding { get; set; }

Property Value

Thickness:

The padding around the text.

Methods

MeasureOverride(Size)

When overridden in a derived class, measures the size in layout required for child elements and determines a size for the FrameworkElement-derived class.

protected override Size MeasureOverride(Size availableSize)
Parameter Type Description
availableSize Size

The available size that this element can give to child elements. Infinity can be specified as a value to indicate that the element will size to whatever content is available.

Returns

Size:

The size that this element determines it needs during layout, based on its calculations of child element sizes.

OnRender(DrawingContext)

When overridden in a derived class, participates in rendering operations that are directed by the layout system. The rendering instructions for this element are not used directly when this method is invoked, and are instead preserved for later asynchronous use by layout and drawing.

protected override void OnRender(DrawingContext drawingContext)
Parameter Type Description
drawingContext DrawingContext

The drawing instructions for a specific element. This context is provided to the layout system.

Fields

ApplicationNameProperty

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

public static readonly DependencyProperty ApplicationNameProperty

DocumentNameProperty

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

public static readonly DependencyProperty DocumentNameProperty

HorizontalContentAlignmentProperty

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

public static readonly DependencyProperty HorizontalContentAlignmentProperty

PaddingProperty

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

public static readonly DependencyProperty PaddingProperty