WindowChromeTitleBarPanel Class
Represents a Panel within a WindowChrome title bar.
public class WindowChromeTitleBarPanel : Panel
- Inheritance:
- object Visual UIElement FrameworkElement Panel object
Constructors
WindowChromeTitleBarPanel()
Initializes an instance of the class.
public WindowChromeTitleBarPanel()
Properties
HeaderAlignment
The HorizontalAlignment of the header.
public HorizontalAlignment HeaderAlignment { get; set; }
Property Value
- HorizontalAlignment:
The default value is
Left.
HeaderMargin
The header's margin.
public Thickness HeaderMargin { get; set; }
Property Value
- Thickness:
The default value is
8, 0, 8, 0.
HeaderMinWidth
The header minimum width, when not all title bar elements fit in the available space.
LeftContentMaxWidthOverflowPercentage
The left content area's maximum width percentage of the total title bar space when not all title bar elements fit in the available space.
public double LeftContentMaxWidthOverflowPercentage { get; set; }
Property Value
- double:
Must be a percentage value between
0.0and1.0. The default value is0.3.
RightContentMaxWidthOverflowPercentage
The right content area's maximum width percentage of the total title bar space when not all title bar elements fit in the available space.
public double RightContentMaxWidthOverflowPercentage { get; set; }
Property Value
- double:
Must be a percentage value between
0.0and1.0. The default value is0.3.
Methods
ArrangeOverride(Size)
When overridden in a derived class, positions child elements and determines a size for a FrameworkElement derived class.
protected override Size ArrangeOverride(Size finalSize)
| Parameter | Type | Description |
|---|---|---|
| finalSize | Size | The final area within the parent that this element should use to arrange itself and its children. |
Returns
- Size:
The actual size used.
GetSlotAlignment(DependencyObject)
Gets the value of the SlotAlignment attached property for the specified object.
[AttachedPropertyBrowsableForChildren]
public static HorizontalAlignment GetSlotAlignment(DependencyObject obj)
| Parameter | Type | Description |
|---|---|---|
| obj | DependencyObject | The object from which the property value is read. |
Returns
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.
OnCreateAutomationPeer()
Returns class-specific AutomationPeer implementations for the Windows Presentation Foundation (WPF) infrastructure.
protected override AutomationPeer OnCreateAutomationPeer()
Returns
- AutomationPeer:
The type-specific AutomationPeer implementation.
SetSlotAlignment(DependencyObject, HorizontalAlignment)
Sets the value of the SlotAlignment attached property to the specified object.
public static void SetSlotAlignment(DependencyObject obj, HorizontalAlignment value)
| Parameter | Type | Description |
|---|---|---|
| obj | DependencyObject | The object to which the attached property is written. |
| value | HorizontalAlignment | The value to set. |
Fields
HeaderAlignmentProperty
Defines the HeaderAlignment property.
public static readonly DependencyProperty HeaderAlignmentProperty
HeaderMarginProperty
Defines the HeaderMargin property.
public static readonly DependencyProperty HeaderMarginProperty
HeaderMinWidthProperty
Defines the HeaderMinWidth property.
public static readonly DependencyProperty HeaderMinWidthProperty
LeftContentMaxWidthOverflowPercentageProperty
Defines the LeftContentMaxWidthOverflowPercentage property.
public static readonly DependencyProperty LeftContentMaxWidthOverflowPercentageProperty
RightContentMaxWidthOverflowPercentageProperty
Defines the RightContentMaxWidthOverflowPercentage property.
public static readonly DependencyProperty RightContentMaxWidthOverflowPercentageProperty
SlotAlignmentProperty
Defines the SlotAlignment property.
public static readonly DependencyProperty SlotAlignmentProperty