Click here to Skip to main content
15,888,521 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Experts,

I am creating checkbox at runtime n assigning tooltip to it..afterword it gets disabled..So my difficulty is it doesnot show tooltip to that disabled checkbox.

I am workingg with WPF n C#

Thanks,
Posted

Have a look at ToolTips in WPF[^]
How to show ToolTips on disabled controls

When you disable a control with IsEnabled=False the tool tip does not show any more. If you want to have the tool tip appear anyway you have to set the attached property ToolTipService.ShowOnDisabled to True.

HTML
<button isenabled="False">
        ToolTip="Saves the current document"
        ToolTipService.ShowOnDisabled="True"
        Content="Save">
</button>

 
Share this answer
 
v2
Comments
Uday P.Singh 7-Oct-11 10:39am    
my 5!
André Kraak 7-Oct-11 12:38pm    
Thanks
AFAIK you can't - tooltips never show unless the associated control can be changed by the user.
 
Share this answer
 
It's not a bug ; it's a feature ^^
 
Share this answer
 
I tried ToolTipService.ShowOnDisabled at coding side but it gives does not found ShowOnDisabled property ....

I repeat i created checkbox at runtime not in xaml

Thanks
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900