WPF: Showing Tooltip on hovering over disabled element
To show the tooltip while hovering over disabled element, use the ShowOnDisabled attached property of the ToolTipService class! From XAML.
Syntax:
<Button ToolTipService.ShowOnDisabled="True"></Button>
Or from C# code, you can call the static method corresponding to the attached property:
ToolTipService.SetShowOnDisabled(myButton, true);
Note: If you want to close the tooltip that is currently showing then,
Set its IsOpen property to false.
Syntax:
<Button ToolTipService.ShowOnDisabled="True"></Button>
Or from C# code, you can call the static method corresponding to the attached property:
ToolTipService.SetShowOnDisabled(myButton, true);
Note: If you want to close the tooltip that is currently showing then,
Set its IsOpen property to false.
Happy Coding!!!
No comments:
Post a Comment