Passing a static readonly value as a CommandParameter via XAML binding?
c#, wpf
Solution
CommandParameter="{x:Static ns:A.MyWidth}"
where `ns` has been mapped to the appropriate CLR namespace.
Problem
I have the following class defined: ``` public static class A { public static readonly double MyWidth = 200d; } ``` If I want to send "MyWidth" as a command parameter to a button, how do I set up the xaml for that? ``` <Button Caption="Large" CommandParameter="What should I type here?"> ``` Thanks!