wpf: how to show tooltip when button disabled by command?

前端 未结 3 1668
感动是毒
感动是毒 2021-01-30 02:00

I\'m trying to show a tooltip regardless of a buttons state, but this does not seem to do the trick:

3条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-30 02:39

    This is a good method to add to your startup code

    ToolTipService.ShowOnDisabledProperty.OverrideMetadata(
        typeof(FrameworkElement),
        new FrameworkPropertyMetadata(true));
    

提交回复
热议问题