title: Changing Material Design Icon and Text to Primary Color
body: <p>It is my first time using material design and whilst everything is working very affectly I was slightly confused with the icon colors.</p>
  <p>In my App.xaml I have the following resource dictionaries;</p>
  <pre><code>&lt;Application.Resources&gt;
          &lt;ResourceDictionary&gt;
              &lt;ResourceDictionary.MergedDictionaries&gt;
                  &lt;ResourceDictionary Source=&quot;pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Dark.xaml&quot; /&gt;
                  &lt;ResourceDictionary Source=&quot;pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml&quot; /&gt;
                  &lt;ResourceDictionary Source=&quot;pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Primary/MaterialDesignColor.Grey.xaml&quot; /&gt;
                  &lt;ResourceDictionary Source=&quot;pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Accent/MaterialDesignColor.Yellow.xaml&quot; /&gt;
              &lt;/ResourceDictionary.MergedDictionaries&gt;
          &lt;/ResourceDictionary&gt;
      &lt;/Application.Resources&gt;
  </code></pre>
  <p>And on my form I have an icon and textblock;</p>
  <pre><code>        &lt;DockPanel&gt;
              &lt;materialDesign:PackIcon x:Name=&quot;iconWarning&quot; Width=&quot;25&quot; Height=&quot;25&quot; Margin=&quot;5&quot; Kind=&quot;Warning&quot; Foreground=&quot;OrangeRed&quot; /&gt;
              &lt;TextBlock x:Name=&quot;lblWarning&quot; Text=&quot;Warning&quot; HorizontalAlignment=&quot;Left&quot; VerticalAlignment=&quot;Center&quot; Margin=&quot;5&quot; Padding=&quot;5&quot; Foreground=&quot;OrangeRed&quot;/&gt;
          &lt;/DockPanel&gt;
  </code></pre>
  <p>However, in my C# code I have a method which can change the theme in use, and also changes the primary and secondary colors. However, how can I set my textblock and icon to use the primary color similarly to how you can set with a colorzone for example using mode as oppsoed to having to use Foreground=&quot;OrangeRed&quot;;</p>
  <pre><code>Mode=&quot;PrimaryMid&quot;
  </code></pre>