Hide tooltip if binding is null

后端 未结 6 609
情深已故
情深已故 2021-02-01 14:33

Currently i\'ve got the following code to show a tooltip.



        
6条回答
  •  孤城傲影
    2021-02-01 15:34

    One way to hide an empty tooltip for all controls is to create a style in a resource dictionary that is included in your App.xaml. This style sets the visibility to collapsed when the tooltip is an empty string or null:

    
    
    

    Also include sys namespace (for String.Empty):

    xmlns:sys="clr-namespace:System;assembly=mscorlib"
    

提交回复
热议问题