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?
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
[ValueConversion(typeof(bool), typeof(bool))]
public class NegateConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
return !((bool)value);
}
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
throw new NotImplementedException();
}
}