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
Gets or sets the HorizontalAlignment of the header.
public HorizontalAlignment HeaderAlignment { get; set; }
Property Value
- HorizontalAlignment:
The optional HorizontalAlignment of the header. The default value is
Left
.
HeaderMargin
Gets or sets the header's margin.
public Thickness HeaderMargin { get; set; }
Property Value
- Thickness:
The header's margin. The default value is
8, 0, 8, 0
.
HeaderMinWidth
Gets or sets the header minimum width, when not all title bar elements fit in the available space.
public double HeaderMinWidth { get; set; }
Property Value
- double:
The header minimum width, when not all title bar elements fit in the available space. The default value is
50
.
LeftContentMaxWidthOverflowPercentage
Gets or sets 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:
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. Must be a percentage value between
0.0
and1.0
. The default value is0.3
.
RightContentMaxWidthOverflowPercentage
Gets or sets 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:
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. Must be a percentage value between
0.0
and1.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
- HorizontalAlignment:
The object's value.
MeasureOverride(Size)
Measures all children given an available size and returns the element's desired size based on the size of its children.
protected override Size MeasureOverride(Size availableSize)
Parameter | Type | Description |
---|---|---|
availableSize | Size | The size the element is suggested to fit inside. |
Returns
- Size:
The desired size of the element.
OnCreateAutomationPeer()
Creates an appropriate WindowChromeTitleBarPanelAutomationPeer for this control as part of the WPF infrastructure.
protected override AutomationPeer OnCreateAutomationPeer()
Returns
- AutomationPeer:
A new instance of WindowChromeTitleBarPanelAutomationPeer.
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
Identifies the HeaderAlignment
dependency property. This field is read-only.
public static readonly DependencyProperty HeaderAlignmentProperty
HeaderMarginProperty
Identifies the HeaderMargin dependency property. This field is read-only.
public static readonly DependencyProperty HeaderMarginProperty
HeaderMinWidthProperty
Identifies the HeaderMinWidth
dependency property. This field is read-only.
public static readonly DependencyProperty HeaderMinWidthProperty
LeftContentMaxWidthOverflowPercentageProperty
Identifies the LeftContentMaxWidthOverflowPercentage
dependency property. This field is read-only.
public static readonly DependencyProperty LeftContentMaxWidthOverflowPercentageProperty
RightContentMaxWidthOverflowPercentageProperty
Identifies the RightContentMaxWidthOverflowPercentage
dependency property. This field is read-only.
public static readonly DependencyProperty RightContentMaxWidthOverflowPercentageProperty
SlotAlignmentProperty
Identifies the SlotAlignment
dependency property. This field is read-only.
public static readonly DependencyProperty SlotAlignmentProperty