How can I ensure that a button's Tooltip is only visible when the button is disabled?
What can I bind the tooltip's visibility to?
How can I ensure that a button's Tooltip is only visible when the button is disabled?
What can I bind the tooltip's visibility to?
You can do it using a simple trigger also. Just place the following piece of code into a Window.
You will need to set ToolTipService.ShowOnDisabled to True on the Button in order to have the Tooltip visible at all when the Button is disabled. You can bind ToolTipService.IsEnabled on the Button to enable and disable the Tooltip.
A slightly modified answer for what David Ward has proposed. Here is the full code
Add a value converter to resouces like this
Then define following xaml
The value converter looks like this
This is the full XAML of the Button (based on the answer of @Quartermeister)