HypernovaDesktop Components · docs
Binarymission
WPF › Ribbon › BinaryRibbonScreenTip

BinaryRibbonScreenTip

class.NET 6 / 8 / 10.NET Framework 4.8Binarymission.WPF.Controls.Office

A screen tip: the titled, described tool tip an Office-style ribbon shows for a command.

public class BinaryRibbonScreenTip : ToolTip

Inherits from / implements: ToolTip

Remarks

A screen tip carries a title, a description, an optional picture, and an optional footer offering help. It is an ordinary ToolTip, so it can be assigned to any element's ToolTip property; assigning it through ScreenTip instead also applies the timings and the show-on-disabled behaviour a ribbon command wants. A command that is disabled can say why: DisabledDescription replaces Description while the element the tip belongs to is disabled, which is the one moment a user most needs telling. F1 while the tip is on screen raises HelpRequestedEvent on the element the tip belongs to, carrying HelpTopic, so the event can be handled anywhere above that element - the group, the tab or the ribbon - rather than per command.

Members at a glance

DescriptionGets or sets what the command does, in a sentence or two.
DisabledDescriptionGets or sets what to say instead of Description while the element the tip belongs to is disabled.
FooterImageGets or sets the small picture shown in the footer, beside the help text.
FooterTextGets or sets the footer line, usually the offer of further help.
HelpTopicGets or sets what the application should open when the user presses F1 on this tip.
ImageGets or sets the picture shown beside the description.
IsOwnerEnabledGets whether the element this tip belongs to is currently enabled.
MaximumContentWidthGets or sets how wide the tip's text is allowed to run before it wraps.
TitleGets or sets the command's name, shown in bold at the top of the tip.
AddHelpRequestedHandlerAdds a handler for HelpRequestedEvent to an element.
OnClosedRaises the Closed event.
OnOpenedRaises the Opened event.
RemoveHelpRequestedHandlerRemoves a handler for HelpRequestedEvent from an element.
DescriptionPropertyIdentifies the Description dependency property.
DisabledDescriptionPropertyIdentifies the DisabledDescription dependency property.
FooterImagePropertyIdentifies the FooterImage dependency property.
FooterTextPropertyIdentifies the FooterText dependency property.
HelpRequestedEventOccurs when the user presses F1 while a screen tip is on screen.
HelpTopicPropertyIdentifies the HelpTopic dependency property.
ImagePropertyIdentifies the Image dependency property.
IsOwnerEnabledPropertyIdentifies the IsOwnerEnabled dependency property.
MaximumContentWidthPropertyIdentifies the MaximumContentWidth dependency property.
TitlePropertyIdentifies the Title dependency property.

Properties

Description

public string Description

Gets or sets what the command does, in a sentence or two.

Value. The description. The default is null , which hides the description.

DisabledDescription

public string DisabledDescription

Gets or sets what to say instead of Description while the element the tip belongs to is disabled.

Value. The reason the command cannot be used. The default is null , which leaves Description showing whether the command is available or not.

FooterImage

public ImageSource FooterImage

Gets or sets the small picture shown in the footer, beside the help text.

Value. The footer image. The default is null .

FooterText

public string FooterText

Gets or sets the footer line, usually the offer of further help.

Value. The footer text. The default is null ; the footer is hidden unless this or FooterImage is set.

HelpTopic

public string HelpTopic

Gets or sets what the application should open when the user presses F1 on this tip.

Value. The topic, in whatever form the application's help understands. The default is null .

The control does not open anything itself: it raises HelpRequestedEvent and the application decides what a topic means.

Image

public ImageSource Image

Gets or sets the picture shown beside the description.

Value. The image. The default is null , which hides the picture.

IsOwnerEnabled

public bool IsOwnerEnabled

Gets whether the element this tip belongs to is currently enabled.

Value. true while the element is enabled. The default is true .

Set as the tip opens, so the template can show DisabledDescription in place of Description. The tip is not part of the element's visual tree, so it cannot reach the element's own IsEnabled with a trigger.

MaximumContentWidth

public double MaximumContentWidth

Gets or sets how wide the tip's text is allowed to run before it wraps.

Value. The width in device-independent pixels. The default is 300.

Title

public string Title

Gets or sets the command's name, shown in bold at the top of the tip.

Value. The title. The default is null , which hides the title line.

Methods

AddHelpRequestedHandler

public static void AddHelpRequestedHandler( DependencyObject element, EventHandler<BinaryRibbonScreenTipHelpRequestedEventArgs> handler)

Adds a handler for HelpRequestedEvent to an element.

element
The element to handle the event on.
handler
The handler.

OnClosed

protected override void OnClosed(RoutedEventArgs e)

Raises the Closed event.

e
The data for the event.

OnOpened

protected override void OnOpened(RoutedEventArgs e)

Raises the Opened event.

e
The data for the event.

RemoveHelpRequestedHandler

public static void RemoveHelpRequestedHandler( DependencyObject element, EventHandler<BinaryRibbonScreenTipHelpRequestedEventArgs> handler)

Removes a handler for HelpRequestedEvent from an element.

element
The element the handler was added to.
handler
The handler.

Fields

DescriptionProperty

public static readonly DependencyProperty DescriptionProperty

Identifies the Description dependency property.

DisabledDescriptionProperty

public static readonly DependencyProperty DisabledDescriptionProperty

Identifies the DisabledDescription dependency property.

FooterImageProperty

public static readonly DependencyProperty FooterImageProperty

Identifies the FooterImage dependency property.

FooterTextProperty

public static readonly DependencyProperty FooterTextProperty

Identifies the FooterText dependency property.

HelpRequestedEvent

public static readonly RoutedEvent HelpRequestedEvent

Occurs when the user presses F1 while a screen tip is on screen.

Raised on the element the tip belongs to and bubbles from there, so one handler on the ribbon, a tab or a group answers for every command beneath it.

HelpTopicProperty

public static readonly DependencyProperty HelpTopicProperty

Identifies the HelpTopic dependency property.

ImageProperty

public static readonly DependencyProperty ImageProperty

Identifies the Image dependency property.

IsOwnerEnabledProperty

public static readonly DependencyProperty IsOwnerEnabledProperty

Identifies the IsOwnerEnabled dependency property.

MaximumContentWidthProperty

public static readonly DependencyProperty MaximumContentWidthProperty

Identifies the MaximumContentWidth dependency property.

TitleProperty

public static readonly DependencyProperty TitleProperty

Identifies the Title dependency property.