WPF BooleanToVisibilityConverter that converts to Hidden instead of Collapsed when false?

后端 未结 6 1958
予麋鹿
予麋鹿 2020-12-12 22:14

Is there a way to use the existing WPF BooleanToVisibilityConverter converter but have False values convert to Hidden instead of the default Collapsed, or should I just writ

6条回答
  •  情书的邮戳
    2020-12-12 22:21

    Can you not just use a style instead of a converter? The code would be something like:

    
    

    You'll need to provide the property binding yourself to point to your bool property.

提交回复
热议问题