Dienstag, 13. August 2013

How to bind to a static resource of - for instance - App.xaml.cs class?

1) define the appropriate Namespace of your Project in XAML...

                        xmlns:Project="clr-namespace:MyCurrentProject"


2) bind a property (IsEnabled)  to a boolean static source in XAML (for instance isRegistered true/false) ...

           ...             IsEnabled="{Binding Source={x:Static Project:App.isRegistered}}"  ...

Benefit from the best Windows Desktop app in the world and use Strokey.Net!

Keine Kommentare:

Kommentar veröffentlichen