I've recently encountered an error that only appears when working on XAML in blend and not when working on XAML in VS.
Blend is apparently more sensitive then Visual studio 2008 when it comes to type checking templates.
If you forget to set the
TargetType in a
ControlTemplate and access certain properties in the content presenter, Blend will report an error and you will not be able to edit the XAML in design mode.
Note that this error only effects design mode in blend, the XAML still compiles and works perfectly (assuming we apply the template to the correct type).
Example:
Ok on blend, ok on VS 2008 ->
<ControlTemplate x:Key="MyXTemplate" TargetType="MyClassType">
Invalid XAML error on blend, ok on VS 2008 ->
<ControlTemplate x:Key="MyXTemplate">
For the error to appear you will also have to access non globally shared properties in the content presenter.
In the example below we try to set a content property which is not guaranteed to exist in the type we apply the template to.
Example:
<ContentPresenter Content="{TemplateBinding Content}" />