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

System.Boolean:

true if the image and label can be indented if present; otherwise, false.

HasImage

Gets whether the source element has an image.

public bool HasImage { get; }

Property Value

System.Boolean:

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

System.Boolean:

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

System.String:

The text label to display.

SmallImageSource

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

public ImageSource SmallImageSource { get; set; }

Property Value

System.Windows.Media.ImageSource:

The System.Windows.Media.ImageSource for a small image.

SourceElement

Gets or sets the source element.

public FrameworkElement SourceElement { get; set; }

Property Value

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

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

Returns

System.Windows.Media.Geometry:

The clipping geometry.

MeasureOverride(Size)

Called to remeasure a control.

protected override Size MeasureOverride(Size constraint)
Parameter Type Description
constraint System.Windows.Size

The maximum size that the method can return.

Returns

System.Windows.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 System.Windows.Controls.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 System.Windows.Controls.ToolTipEventArgs

Provides data about the event.

Fields

CanIndentContentProperty

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

public static readonly DependencyProperty CanIndentContentProperty

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

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