I have a fairly simple WPF project that I just started in VS 2012. I wanted some design-time data, so I tried adding The following code snippet to both my window and the base grid elements in my XAML:
d:DataContext="{d:DesignData Source=./DesignData/SampleCustomer.xaml}"
However, the compiler does not recognize the "d:" prefix. Is this supported in VS2012? Do I need to add an xmlns tag?
Here is the initial code in my xaml file:
<Window x:Class="EventExplorer.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="478.374" Width="785.381"><Grid ><Grid.ColumnDefinitions><ColumnDefinition Width="30*"/><ColumnDefinition Width="59*"/><ColumnDefinition Width="52*"/></Grid.ColumnDefinitions>
Eric Jorgensen http://www.ericjorgensen.com