Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

d:DesignData isn't recognized in VS2012 WPF project

$
0
0

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


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>