In This Article

ExternalHeaderPresenter Class

Represents a control that renders an external header (image and label) for a bar control that can't render them itself, such as BarComboBox.

public class ExternalHeaderPresenter : Control
Inheritance:
object Visual UIElement FrameworkElement Control object

Constructors

ExternalHeaderPresenter()

Initializes a new instance of the ExternalHeaderPresenter class.

public ExternalHeaderPresenter()

Properties

CanIndentContent

Gets or sets whether the image and label can be indented if present.

public bool CanIndentContent { get; set; }

Property Value

bool:

true if the image and label can be indented if present; otherwise, false. The default value is false.

CanShowImage

Gets or sets whether an image should be displayed if present.

public bool CanShowImage { get; set; }

Property Value

bool:

true if an image should be displayed if present; otherwise, false. The default value is true.

HasImage

Gets whether the source element has an image.

public bool HasImage { get; }

Property Value

bool:

true if the source element has an image; otherwise, false.

HasLabel

Gets whether the source element has a label.

public bool HasLabel { get; }

Property Value

bool:

true if the source element has a label; otherwise, false.

Label

Gets or sets the text label to display.

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

Property Value

string:

The text label to display.

SmallImageSource

Gets or sets the ImageSource for a small image, generally 16x16 size.

public ImageSource SmallImageSource { get; set; }

Property Value

ImageSource:

The ImageSource for a small image.

SourceElement

Gets or sets the source element.

public FrameworkElement SourceElement { get; set; }

Property Value

FrameworkElement:

The source element.

Methods

GetLayoutClip(Size)

Returns a geometry for a clipping mask. The mask applies if the layout system attempts to arrange an element that is larger than the available display space.

protected override Geometry GetLayoutClip(Size layoutSlotSize)
Parameter Type Description
layoutSlotSize Size

The size of the part of the element that does visual presentation.

Returns

Geometry:

The clipping geometry.

MeasureOverride(Size)

Called to remeasure a control.

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

The maximum size that the method can return.

Returns

Size:

The size of the control, up to the maximum specified by constraint.

OnToolTipClosing(ToolTipEventArgs)

Invoked whenever an unhandled ToolTipClosing routed event reaches this class in its route. Implement this method to add class handling for this event.

protected override void OnToolTipClosing(ToolTipEventArgs e)
Parameter Type Description
e ToolTipEventArgs

Provides data about the event.

OnToolTipOpening(ToolTipEventArgs)

Invoked whenever the ToolTipOpening routed event reaches this class in its route. Implement this method to add class handling for this event.

protected override void OnToolTipOpening(ToolTipEventArgs e)
Parameter Type Description
e ToolTipEventArgs

Provides data about the event.

Fields

CanIndentContentProperty

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

public static readonly DependencyProperty CanIndentContentProperty

CanShowImageProperty

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

public static readonly DependencyProperty CanShowImageProperty

HasImageProperty

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

public static readonly DependencyProperty HasImageProperty

HasLabelProperty

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

public static readonly DependencyProperty HasLabelProperty

LabelProperty

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

public static readonly DependencyProperty LabelProperty

SmallImageSourceProperty

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

public static readonly DependencyProperty SmallImageSourceProperty

SourceElementProperty

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

public static readonly DependencyProperty SourceElementProperty