Bool to visibility converter xaml




















XPO Profiler. Core Libraries. Controls and Extensions ASP. NET Core Controls. NET Bootstrap Controls. DevExtreme ASP. Blazor Components. Tools ASP. NET Theme Builder. NET Theme Deployer. Maintenance Mode ASP. Free Xamarin. Forms UI Controls. Enterprise and Analytic Tools. Report and Dashboard Server.

BI Dashboard. Office File API. End-User Documentation. Interface Elements for Desktop. Gets the Type of the current instance. Creates a shallow copy of the current Object. Skip to main content. This browser is no longer supported. Download Microsoft Edge More info. Contents Exit focus mode. Please rate your experience Yes No. In their documentation they say you can use their MapConverter to convert from Visibility enumeration to bool.

I was looking for a more general answer, but could not find it. I wrote a converter that might help others. You can add QuickConverter via NuGet. Have a look at the documentation for setup. We now support either feature with the following table.

We probably at this point would rename the object to BooleanToVisibilityConverter, but Microsoft already took that object name so I will leave it named as is. Now we have to reverse the mapping. This is also quite simple. We add another bool property called Reverse. Then key of that in another if statement. It is so simple. This is a perfect example of where Microsoft would benefit from Open Sourcing some of their code. A dozen people would have contributed this change by now if they had and all Microsoft would have to do is look at the submitted code, approve, and check it in.

Name required.



0コメント

  • 1000 / 1000