title: XAML Parse Exception - xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
body: <p>I was working on a WPF project on my PC last night, using VS 2010 Ultimate.</p>
  
  <p>I have just opened it up on my Netbook with VS C# 2010 Express. </p>
  
  <p>When I try to run it, it I am thrown an XAML Parse Exception which tells me that the line:</p>
  
  <pre><code>xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  </code></pre>
  
  <p>Is the problem. I can't see a problem with it, I have never changed it and it looks like it is what it should be.</p>
  
  <p>The Error:</p>
  
  <pre><code>'The invocation of the constructor on type 'WpfApplication1.MainWindow' that matches the specified binding constraints threw an exception.' Line number '3' and line position '9'.
  </code></pre>
  
  <p>Full 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"
      Title="Camera" Height="550" Width="826" Background="#ddd" ResizeMode="NoResize" WindowStyle="None" MouseLeftButtonDown="Window_MouseLeftButtonDown" BorderBrush="#FF8D8D8D" BorderThickness="2" &gt;
  &lt;Window.Resources&gt;
      &lt;Style TargetType="{x:Type Button}"&gt;
          &lt;Setter Property="Template"&gt;
              &lt;Setter.Value&gt;
                  &lt;ControlTemplate TargetType="{x:Type Button}"&gt;
                     &lt;ContentPresenter
                Margin="{TemplateBinding Control.Padding}"
                HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}"
                VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}"
                SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}"
                ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}"
                RecognizesAccessKey="True"
                Content="{TemplateBinding ContentControl.Content}" /&gt;
                  &lt;/ControlTemplate&gt;
              &lt;/Setter.Value&gt;
          &lt;/Setter&gt;
      &lt;/Style&gt;
  &lt;/Window.Resources&gt;
  &lt;Grid Width="830" Height="510"&gt;
      &lt;Grid.ColumnDefinitions&gt;
          &lt;ColumnDefinition Width="132" /&gt;
          &lt;ColumnDefinition Width="698*" /&gt;
      &lt;/Grid.ColumnDefinitions&gt;
      &lt;Grid.RowDefinitions&gt;
          &lt;RowDefinition Height="29" /&gt;
          &lt;RowDefinition Height="319" /&gt;
          &lt;RowDefinition Height="121" /&gt;
          &lt;RowDefinition Height="16" /&gt;
          &lt;RowDefinition Height="25*" /&gt;
      &lt;/Grid.RowDefinitions&gt;
      &lt;ComboBox Name="PortNames" Height="23" HorizontalAlignment="Left" VerticalAlignment="Top" Width="120" SelectionChanged="PortNames_SelectionChanged" Margin="12,6,0,0" /&gt;
      &lt;Ellipse Grid.Row="2"  Height="120" HorizontalAlignment="Left" Name="ellipse1" StrokeThickness="6" VerticalAlignment="Top" Width="120" MouseLeftButtonDown="ellipse1_MouseLeftButtonDown" Margin="12,0,0,0"&gt;
          &lt;Ellipse.Fill&gt;
              &lt;LinearGradientBrush EndPoint="1,1" StartPoint="0,0"&gt;
                  &lt;GradientStop Color="#89FF0000" Offset="0" /&gt;
                  &lt;GradientStop Color="Red" Offset="1" /&gt;
              &lt;/LinearGradientBrush&gt;
          &lt;/Ellipse.Fill&gt;
          &lt;Ellipse.Stroke&gt;
              &lt;LinearGradientBrush EndPoint="1,1" StartPoint="0,0"&gt;
                  &lt;GradientStop Color="#FFB10000" Offset="0" /&gt;
                  &lt;GradientStop Color="#83B20707" Offset="0" /&gt;
                  &lt;GradientStop Color="#F7B00000" Offset="1" /&gt;
              &lt;/LinearGradientBrush&gt;
          &lt;/Ellipse.Stroke&gt;
      &lt;/Ellipse&gt;
      &lt;Button Content="Sync" Height="23" HorizontalAlignment="Left" Margin="57,6,0,0" Name="button1" VerticalAlignment="Top" Width="75" Click="button1_Click" Grid.Row="1" /&gt;
      &lt;Rectangle Height="23" HorizontalAlignment="Left" Margin="12,6,0,0" Name="rectangle2" Stroke="Black" VerticalAlignment="Top" Fill="Red" Width="39" OpacityMask="#AA000000" Grid.Row="1" /&gt;
      &lt;ProgressBar Grid.Row="4"  Height="19" HorizontalAlignment="Left" Name="progressBar1" VerticalAlignment="Top" Width="120" Margin="12,2,0,0" /&gt;
      &lt;Rectangle Grid.RowSpan="5" Grid.Column="1" Height="500" Name="rectangle1" Stroke="#aaa" Width="660" Fill="#eee" Margin="12,5,26,5" /&gt;
      &lt;Button Grid.Column="1" Height="18" HorizontalAlignment="Left" Margin="630,-20,0,0" Name="image1" VerticalAlignment="Top" Width="40" Click="image1_Click"&gt;&lt;Image Stretch="Fill" Source="/PhotoProgram;component/Images/Close.png" /&gt;&lt;/Button&gt;
      &lt;Button Grid.Column="1" Height="18" HorizontalAlignment="Left" Margin="587,-20,0,0" Name="minimize" VerticalAlignment="Top" Width="40" Click="minimize_Click"&gt;&lt;Image Stretch="Fill" Source="/PhotoProgram;component/Images/Minimize.png"  /&gt;&lt;/Button&gt;
  &lt;/Grid&gt;
  </code></pre>
  
  <p></p>