1

In Expression Blend 4, it's possible to load design-time resources by editing your project file. Here's an example of what that would look like:

<Page Include="Properties\DesignTimeResources.xaml"
    Condition="'$(DesignTime)'=='true'
    OR ('$(SolutionPath)'!='' AND Exists('$(SolutionPath)')
    AND '$(BuildingInsideVisualStudio)'!='true'
    AND '$(BuildingInsideExpressionBlend)'!='true')">
    <Generator>MSBuild:Compile</Generator>
    <SubType>Designer</SubType>
    <ContainsDesignTimeResources>true</ContainsDesignTimeResources>
</Page>

Now I've been trying to get the same thing working in Visual Studio 2010 without success. Has anyone gotten design-time data to load like this in Visual Studio or is this feature only supported using Expression Blend?

frankacy
  • 13
  • 1
  • 3

1 Answers1

1

You are looking for the use of d:DesignData and d:DataContext. Here is an example on Jag Reehal's blog using Blend and Visual Studio. And a Microsoft Walkthrough

Mark Hall
  • 53,938
  • 9
  • 94
  • 111
  • 1
    Thank you Mark, you got me on the right track! I needed to bind my DataContext to a property, so I ended up doing this: ` ` – frankacy Jul 04 '12 at 21:59