How to fill DataContext when you don’t have one

Since Visual Studio 2010 (long time ago), is’s possible to set design time values to DataContext. It can be either loading data from Xaml file (with d:DesignData, Source and build action of xaml file set to DesignData explained here) or provides a real design type (with d:DesignInstance, Type and IsDesignTimeCreatable as explained here).

Complete documentation is provided here in MSDN and some more details on IsDesignTimeCreatable and CreateList here.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s