How can we improve the Windows dev platform?

Allow C# style boolean conversion with x:Bind

With x:Bind we can invert a boolean property with a ValueConverter like this:

Visibility="{x:Bind IsLoading,Converter="{StaticResource BooleanInverseConverter}"

But wouldn't it be much cleaner for that widely used boolean case to write just this:

Visibility="{x:Bind !IsLoading}"

To generated the code should be possible, and also to check in that generation whether IsLoading is a boolean or not. Even without checking, it won't compile if IsLoading wouldn't be a boolean, which is fine.

Thanks,
Thomas

54 votes
Sign in
(thinking…)
Password icon
Signed in as (Sign out)

We’ll send you updates on this idea

Thomas Claudius Huber shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

4 comments

Sign in
(thinking…)
Password icon
Signed in as (Sign out)
Submitting...

Feedback and Knowledge Base