title: Updating ResourceTheme not reflecting on TextBox BorderBrush in UWP App
body: <p>I am updating App <code>ThemeResource</code> from code-behind. It's changing App Theme but TextBox <code>BorderBrush</code> Property is not getting updated.</p>
  
  <p>I have a custom resource <code>MyBorderBrush</code> for <code>Dark</code> and <code>Light</code> Theme which I have defined in my App.xaml. </p>
  
  <p>Xaml:</p>
  
  <pre><code>&lt;StackPanel&gt;
              &lt;TextBox PlaceholderText="My PlaceholderText" Height="100" Width="500" HorizontalAlignment="Center" Style="{StaticResource NoHighlightTextBoxStyle}" BorderBrush="{Binding IsError, Converter={ThemeResource BorderBrushColorConverter}}" VerticalAlignment="Center" &gt;&lt;/TextBox&gt;
              &lt;Button Content="Change Theme" Click="Button_Click"&gt;&lt;/Button&gt;
  &lt;/StackPanel&gt;
  </code></pre>
  
  <p>Code Behind:</p>
  
  <pre><code>private void Button_Click(object sender, RoutedEventArgs e)
  {
      this.RequestedTheme = this.RequestedTheme == ElementTheme.Light ? ElementTheme.Dark : ElementTheme.Light;
  }
  </code></pre>
  
  <p><strong>EDIT</strong></p>
  
  <p>I thought that the issue might be with code behind or defining the resources, so I just shared the minimal code in order to reproduce the issue. But as pointed by @Ashiq the issue is with TextBox. Actually, the thing is that I have <code>BorderBrush</code> property bound to a converter for getting the correct value, but on changing the theme Border color is not getting changed.</p>
  
  <p>Converter:</p>
  
  <pre><code> public class BorderBrushColorConverter : IValueConverter
   {
          public object Convert(object value, Type targetType, object parameter, string language)
          {
              var isError = value as bool? ?? false;
              return isError
                  ? Application.Current.Resources["MyBorderBrushMandatory"] as SolidColorBrush
                  : Application.Current.Resources["MyBorderBrush"] as SolidColorBrush;
          }
  
          public object ConvertBack(object value, Type targetType, object parameter, string language)
          {
              throw new NotImplementedException();
          }
  }
  </code></pre>
  
  <p>App.xaml</p>
  
  <pre><code>&lt;ResourceDictionary x:Key="Light" &gt;
               &lt;Color x:Key="MyBorder"&gt;#6b6b6b&lt;/Color&gt;
               &lt;SolidColorBrush x:Key="MyBorderBrush" Color="{ThemeResource MyBorder}" /&gt;
  
                &lt;Color x:Key="MyBorderMandatory"&gt;#ff0000&lt;/Color&gt;
                &lt;SolidColorBrush x:Key="MyBorderBrushMandatory" Color="{ThemeResource MyBorderMandatory}" /&gt;
  &lt;/ResourceDictionary&gt;
  &lt;ResourceDictionary x:Key="Dark" &gt;
                 &lt;Color x:Key="MyBorder"&gt;#c85332&lt;/Color&gt;
                 &lt;SolidColorBrush x:Key="MyBorderBrush" Color="{ThemeResource MyBorder}" /&gt;
  
                 &lt;Color x:Key="MyBorderMandatory"&gt;#FFD700&lt;/Color&gt;
                 &lt;SolidColorBrush x:Key="MyBorderBrushMandatory" Color="{ThemeResource MyBorderMandatory}" /&gt;
  &lt;/ResourceDictionary&gt;
  </code></pre>