Interesting. This has always been a pain, and it seems that it was fixed without much advertising, I did not know that.
In WPF, you always had to use ValueConverter because Visibility is not a bool.
I just removed the BooleanToVisibility conversion from {x:Bind ...} to my project and it really still works. I dug this from the generated code:
private void Update_ViewModel_ShowMessage(global::System.Boolean obj, int phase) { ... this.Update_ViewModel_ShowMessage_Cast_ShowMessage_To_Visibility( obj ? global::Windows.UI.Xaml.Visibility.Visible : global::Windows.UI.Xaml.Visibility.Collapsed , phase); ... }
Thus, it is obvious that it is now inline.
Update:
For {x:Bind } was announced here as part of the anniversary update. And you need to target 14393 or later. For older collectors, it only works in {Binding ...} .
source share