KeyTip Class
Represents an Adorner that provides a key tip.
public class KeyTip : Adorner
- Inheritance:
- object Visual UIElement FrameworkElement Adorner object
Constructors
KeyTip(UIElement)
Initializes a new instance of the KeyTip
class.
public KeyTip(UIElement adornedElement)
Parameter | Type | Description |
---|---|---|
adornedElement | UIElement | The UIElement to adorn. |
KeyTip(UIElement, string)
Initializes a new instance of the KeyTip
class.
public KeyTip(UIElement adornedElement, string accessText)
Parameter | Type | Description |
---|---|---|
adornedElement | UIElement | The UIElement to adorn. |
accessText | string | The access text that is displayed on the key tip. |
Properties
AccessText
Gets or sets the access text that is displayed on the key tip.
public string AccessText { get; set; }
Property Value
- string:
The access text that is displayed on the key tip.
Location
Gets or sets a System.Windows.Point that indicates the location of the key tip relative to its owner.
public Point Location { get; set; }
Property Value
- Point:
A System.Windows.Point that indicates the location of the key tip relative to its owner.
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 constraint)
Parameter | Type | Description |
---|---|---|
constraint | 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.
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
AccessTextProperty
Identifies the AccessText dependency property. This field is read-only.
public static readonly DependencyProperty AccessTextProperty
LocationProperty
Identifies the Location dependency property. This field is read-only.
public static readonly DependencyProperty LocationProperty