Binding a SolidColorBrush resource of Theme
WPF
1
Posts
1
Posters
0
Views
1
Watching
-
I need a binding in SolidColorBrush color value inside my theme. So basically, instead of
I want something like -
Property could be defined something like this:
namespace ns
{
public class BindingClass
{
public Color ColorVal
{
get
{
return Color.FromRgb(255, 0, 0);
}
}
}
}Hopefully it's possible. What should I write instead of 'Binding expression' in XAML theme? Update: I've got one solution- On top,
xmlns:local="clr-namespace:ns"
Then a Resource key,
Finally binding,
Any better solution?