title: How to move App.xaml and not to break designer?
body: <p>I have WPF project and some resources defined in App.xaml that are used in other files. When I try to move App.xaml to subdirectory designer is no longer able to find those resources. My project still compiles since I use 'Startup' event instead of 'StartupUri'. How to tell the designer where to search for resources? How it knows where they are when App.xaml is in root of project?</p>
  
  <p><strong>Update:</strong>
  Project files:</p>
  
  <p>App.xaml:</p>
  
  <pre><code>&lt;Application x:Class="WpfApplication1.App"
               xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
               xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
               Startup="startup"&gt;
      &lt;Application.Resources&gt;
          &lt;SolidColorBrush Color="LightGray" x:Key="brush" /&gt;
      &lt;/Application.Resources&gt;
  &lt;/Application&gt;
  </code></pre>
  
  <p>App.xaml.cs</p>
  
  <pre><code>namespace WpfApplication1
  {
      public partial class App : System.Windows.Application
      {
          private void startup(object sender, System.Windows.StartupEventArgs e)
          {
              new MainWindow().Show();
          }
      }
  }
  </code></pre>
  
  <p>MainWindow.xaml:</p>
  
  <pre><code>&lt;Window x:Class="WpfApplication1.MainWindow"
          xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
          xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          Height="300" Width="300" Background="{StaticResource brush}" /&gt;
  </code></pre>
  
  <p>MainWindow.xaml.cs</p>
  
  <pre><code>namespace WpfApplication1
  {
      public partial class MainWindow : System.Windows.Window
      {
          public MainWindow()
          {
              InitializeComponent();
          }
      }
  }
  </code></pre>
  
  <p><strong>Update 2:</strong>
  Uploaded zipped solution to <a href="http://zalil.ru/30771604" rel="nofollow">http://zalil.ru/30771604</a> (download will start automatically)</p>
  
  <p>Mirror: <a href="http://www.speedyshare.com/files/27697250/WpfApplication1.zip" rel="nofollow">http://www.speedyshare.com/files/27697250/WpfApplication1.zip</a></p>