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

37 votes
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    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 →

    3 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      Signed in as (Sign out)
      Submitting...

      Feedback and Knowledge Base