title: Transfer value from code behind in xaml page to change expander foreground
body: <pre><code>&lt;Expander x:Name="exp" 
            IsExpanded="True"
            Background= "White"
            Foreground="Black"&gt;
      &lt;Expander.Header&gt;
          &lt;TextBlock Text="{Binding Name}" /&gt;
      &lt;/Expander.Header&gt;
          &lt;ItemsPresenter /&gt;
  &lt;/Expander&gt;
  </code></pre>
  
  <p>I want to change Foreground value from c# code behind base on a if condition.. how do i transfer the value from code behind to access it in xaml page?</p>