I would like to have one (global, singleton) object in my application that exposes a number of dependency properties. I would like to bind values in XAML to these dependency properties. How can I achieve this so that the syntax of my XAML binding is as simple as possible (in other words, not constantly worrying about RelativeSource, AncestoryType, etc).
I would like to have one (global, singleton) object in my application that exposes
Share
You can use the x:Static markup extension to bind directly to your Singleton, as it’s a static property.
For example, if your singleton had a property named “Foo”: