Anup Shah on WPF and Silverlight (Programming Garden)

IT 's For You!!!

Wednesday, February 27, 2013

WPF: Showing Tooltip on a disabled element



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.

Happy Coding!!!
,

No comments:

Post a Comment