I am trying to do the same thing as it is done here:
Unable to find enum type for static reference in WPF
but instead of enums I have some string constants:
namespace MyProject.XYZ
{
public class MyConstants
{
public const string AAA = "Type AAA";
public const string BBB = "Type BBB";
public const string CCC = "Type CCC";
...
}
}
I have a couple of radio buttons that look like this:
...
xmlns:myConstants="clr-namespace:MyProject.XYZ"
...
<RadioButton IsChecked="{Binding Path=CurrentSelection, Converter={StaticResource MyConverter}, ConverterParameter={x:Static myConstants:MyConstants
.AAA}}" />
...
But i get an error in regards with the command parameter: 'myConstants:MyConstants.AAA' member is not valid because it does not have a qualifying type name.
I've done it with enums and it works, but the application that I am working on heavily relies on these constants.
Any ideas are greatly appreciated.
Thanks.