title: Loading page as frame content in WPF, but dynamic resources in loaded page won't update dynamically?
body: <p>So, I've gone and did what Edd asked and rewrote this. The problem is a textblock with a dynamic resource as its content, updates properly when the textblock is on the mainwindow. But when I try to load page1 into a frame on the mainwindow, it loads but does not update the dynamic resource. I'm a total noob so not sure what I'm even looking for to find what's causing the issue, let alone fix it. Any help appreciated!</p>
  
  <p>This is the application.xaml:</p>
  
  <pre><code>&lt;Application x:Class="Application"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:local="clr-namespace:WpfApp2"
               xmlns:sys="clr-namespace:System;assembly=mscorlib"
               StartupUri="MainWindow.xaml"&gt;
      &lt;Application.Resources&gt;
          &lt;sys:String x:Key="TestString"&gt;This string is for testing.&lt;/sys:String&gt;
      &lt;/Application.Resources&gt;
  &lt;/Application&gt;
  </code></pre>
  
  <p>This is the MainWindow.xaml:</p>
  
  <pre><code>&lt;Window x:Class="MainWindow"
          xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
          xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
          xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
          xmlns:local="clr-namespace:WpfApp2"
          mc:Ignorable="d"
          Title="MainWindow" Height="450" Width="800"&gt;
      &lt;Grid&gt;
          &lt;Frame x:Name="MainFrame" NavigationUIVisibility="Hidden"/&gt;
  
          &lt;TextBlock HorizontalAlignment="Left" Margin="125,299,0,0" TextWrapping="Wrap" Text="{DynamicResource TestString}" VerticalAlignment="Top" Height="110" Width="515" FontSize="48"/&gt;
  
          &lt;Button Content="Call Page" HorizontalAlignment="Left" Margin="165,270,0,0" VerticalAlignment="Top" Width="75" Click="Button_Click"/&gt;
          &lt;Button Content="Change Text" HorizontalAlignment="Left" Margin="490,270,0,0" VerticalAlignment="Top" Width="75" Click="Button_Click_1"/&gt;
      &lt;/Grid&gt;
  &lt;/Window&gt;
  </code></pre>
  
  <p>This is the Page1.xaml:</p>
  
  <pre><code>&lt;Page x:Class="Page1"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
        xmlns:local="clr-namespace:WpfApp2"
        mc:Ignorable="d" 
        d:DesignHeight="450" d:DesignWidth="800"
        Title="Page1"&gt;
      &lt;Grid&gt;
          &lt;TextBlock HorizontalAlignment="Left" Margin="125,140,0,0" TextWrapping="Wrap" Text="{DynamicResource TestString}" VerticalAlignment="Top" Height="110" Width="515" FontSize="48"/&gt;
      &lt;/Grid&gt;
  &lt;/Page&gt;
  </code></pre>
  
  <p>And this is the MainWindow.xaml.vb (Code-Behind):</p>
  
  <pre><code>Class MainWindow
      Private Sub Button_Click(sender As Object, e As RoutedEventArgs)
          MainFrame.Content = New Page1
      End Sub
  
      Private Sub Button_Click_1(sender As Object, e As RoutedEventArgs)
          Resources("TestString") = "Test Completed."
      End Sub
  End Class
  </code></pre>
  
  <p>When I run the program and press both buttons, this is the result:</p>
  
  <p><a href="https://i.stack.imgur.com/82ZmI.png" rel="nofollow noreferrer">Image of the result</a></p>
  
  <p>The string updates for the Textblock on the MainWindow, but not for the one on Page1 called into the frame.</p>