C#C
C#15mo ago
LETO

Constants for WPF

atm I'm using static resources in the 'main' xaml page e.g:
<Window.Resources>
    <SolidColorBrush x:Key="colour_1" Color="#FE1E3C"/>
    <SolidColorBrush x:Key="colour_2" Color="#fffcf9"/>
    <SolidColorBrush x:Key="colour_3" Color="#426A5A"/>
    <SolidColorBrush x:Key="colour_4" Color="#6D435A"/>
    <SolidColorBrush x:Key="colour_5" Color="#352d39"/>
</Window.Resources>


Is there away to access these from other xaml classes, or will I have to make a constants class and figure out how to use those constants within the markup stuff?
Was this page helpful?