In This Article

ScreenTip Class

Represents a screen tip that is a drop-in replacement for ToolTip, but designed to show rich content with a specific appearance.

[TemplatePart(Name = "PART_Shadow", Type = typeof(ShadowChrome))]
public class ScreenTip : ToolTip
Inheritance:
object Visual UIElement FrameworkElement Control ContentControl ToolTip object

Constructors

ScreenTip()

Initializes an instance of the class.

public ScreenTip()

Properties

ComplexContentWidth

The width the ScreenTip when it hosts complex content.

public double ComplexContentWidth { get; set; }

Property Value

double

The content to display in the footer.

public object? Footer { get; set; }

Property Value

object

FooterTemplate

The DataTemplate to use for displaying the footer.

public DataTemplate? FooterTemplate { get; set; }

Property Value

DataTemplate

FooterTemplateSelector

The DataTemplateSelector to use for displaying the footer.

public DataTemplateSelector? FooterTemplateSelector { get; set; }

Property Value

DataTemplateSelector

HasFooter

Indicates whether there is Footer content available.

public bool HasFooter { get; }

Property Value

bool:

true if there is Footer content available; otherwise, false.

HasHeader

Indicates whether there is Header content available.

public bool HasHeader { get; }

Property Value

bool:

true if there is Header content available; otherwise, false.

Header

The content to display in the header.

public object? Header { get; set; }

Property Value

object

HeaderTemplate

The DataTemplate to use for displaying the header.

public DataTemplate? HeaderTemplate { get; set; }

Property Value

DataTemplate

HeaderTemplateSelector

The DataTemplateSelector to use for displaying the header.

public DataTemplateSelector? HeaderTemplateSelector { get; set; }

Property Value

DataTemplateSelector

RequiresCustomPlacement

Indicates whether custom placement is required.

public bool RequiresCustomPlacement { get; }

Property Value

bool:

true if custom placement is required; otherwise, false.

Methods

OnApplyTemplate()

When overridden in a derived class, is invoked whenever application code or internal processes call ApplyTemplate().

public override void OnApplyTemplate()

OnFooterChanged(object?, object?)

Occurs when the Footer property value is changed.

protected virtual void OnFooterChanged(object? oldValue, object? newValue)
Parameter Type Description
oldValue object

The old value.

newValue object

The new value.

OnFooterTemplateChanged(DataTemplate?, DataTemplate?)

Occurs when the FooterTemplate property value is changed.

protected virtual void OnFooterTemplateChanged(DataTemplate? oldValue, DataTemplate? newValue)
Parameter Type Description
oldValue DataTemplate

The old value.

newValue DataTemplate

The new value.

OnFooterTemplateSelectorChanged(DataTemplateSelector?, DataTemplateSelector?)

Occurs when the FooterTemplateSelector property value is changed.

protected virtual void OnFooterTemplateSelectorChanged(DataTemplateSelector? oldValue, DataTemplateSelector? newValue)
Parameter Type Description
oldValue DataTemplateSelector

The old value.

newValue DataTemplateSelector

The new value.

OnHeaderChanged(object?, object?)

Occurs when the Header property value is changed.

protected virtual void OnHeaderChanged(object? oldValue, object? newValue)
Parameter Type Description
oldValue object

The old value.

newValue object

The new value.

OnHeaderTemplateChanged(DataTemplate?, DataTemplate?)

Occurs when the HeaderTemplate property value is changed.

protected virtual void OnHeaderTemplateChanged(DataTemplate? oldValue, DataTemplate? newValue)
Parameter Type Description
oldValue DataTemplate

The old value.

newValue DataTemplate

The new value.

OnHeaderTemplateSelectorChanged(DataTemplateSelector?, DataTemplateSelector?)

Occurs when the HeaderTemplateSelector property value is changed.

protected virtual void OnHeaderTemplateSelectorChanged(DataTemplateSelector? oldValue, DataTemplateSelector? newValue)
Parameter Type Description
oldValue DataTemplateSelector

The old value.

newValue DataTemplateSelector

The new value.

OnPropertyChanged(DependencyPropertyChangedEventArgs?)

Invoked whenever the effective value of any dependency property on this FrameworkElement has been updated. The specific dependency property that changed is reported in the arguments parameter. Overrides System.Windows.DependencyObject.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs).

protected override void OnPropertyChanged(DependencyPropertyChangedEventArgs? e)
Parameter Type Description
e DependencyPropertyChangedEventArgs

The event data that describes the property that changed, as well as old and new values.

ToString()

Returns the string representation of this object.

public override string ToString()

Returns

string:

The string representation of this object.

Fields

ComplexContentWidthProperty

Defines the ComplexContentWidth property.

public static readonly DependencyProperty ComplexContentWidthProperty

FooterProperty

Defines the Footer property.

public static readonly DependencyProperty FooterProperty

FooterTemplateProperty

Defines the FooterTemplate property.

public static readonly DependencyProperty FooterTemplateProperty

FooterTemplateSelectorProperty

Defines the FooterTemplateSelector property.

public static readonly DependencyProperty FooterTemplateSelectorProperty

HasFooterProperty

Defines the HasFooter property.

public static readonly DependencyProperty HasFooterProperty

HasHeaderProperty

Defines the HasHeader property.

public static readonly DependencyProperty HasHeaderProperty

HeaderProperty

Defines the Header property.

public static readonly DependencyProperty HeaderProperty

HeaderTemplateProperty

Defines the HeaderTemplate property.

public static readonly DependencyProperty HeaderTemplateProperty

HeaderTemplateSelectorProperty

Defines the HeaderTemplateSelector property.

public static readonly DependencyProperty HeaderTemplateSelectorProperty

RequiresCustomPlacementProperty

Defines the RequiresCustomPlacement property.

public static readonly DependencyProperty RequiresCustomPlacementProperty

Extension Methods