I have the following construct:
public static class Constants { public static class Foo { public static string Bar { get {
I want to bind this to a button in usercontrol.
<Button Content="{Binding Source={x:Static ns:Constants.Foo.Bar}}" />
(where ns refers to the assembly and namespace where "Constants" is defined).
This leads to two errors:
- "Cannot find type 'Constants.Foo. Please note that type names are case sensitive."
- 'Type' ns: Constants.Foo 'not found.
I also tried:
<Button Content="{Binding Source={x:Static ns:Constants+Foo.Bar}}" />
This leads to one error:
- "Type 'ns: Constants + Foo' not found."
Is it possible to bind a static property in a static class in a static class? If so, how?
source share