Print Page | Close Window

Design Time Support

Printed From: IdeaBlade
Category: Cocktail
Forum Name: Community Forum
Forum Discription: A professional application framework using Caliburn.Micro and DevForce
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=4023
Printed Date: 28-Mar-2025 at 11:47am


Topic: Design Time Support
Posted By: gregweb
Subject: Design Time Support
Date Posted: 08-Mar-2013 at 7:22am
I notice in the Harness project there is some design time support using the ViewModelLocator and DesignTimeResourceMgtUnitOfWorkManager.

I am trying to get this going, for example on the StaffingResourceSummaryView. However, when I switch over to design view, it throws an error:

You must first set a valid CompositionProvider by using Composition.SetProvider.

I like the idea of Design time support as when I am tweaking out a GUI, getting a visual is the only way to go.

Greg



Replies:
Posted By: mgood
Date Posted: 08-Mar-2013 at 7:29am
Is this happening in TempHire or your own solution? If it's in TempHire, can you do me a favor and open a bug on github? 

http://github.com/IdeaBlade/Cocktail/issues - https://github.com/IdeaBlade/Cocktail/issues


Posted By: gregweb
Date Posted: 08-Mar-2013 at 8:58am
TempHire. I just opened an issue on github.

Greg


Posted By: mgood
Date Posted: 08-Mar-2013 at 9:19am
Thanks. I will investigate.


Posted By: mgood
Date Posted: 09-Mar-2013 at 1:02pm
Greg,
I wanted to set some expectations before I fix this bug. Currently, DevForce doesn't fully support design time data. In particular you can't use code-first at design time. There are security constraints at design time that cause DF to fail when trying to load the metadata. You can suggest a feature on our new User Voice site for DevForce if full design time data support is important to you. I can fix the current bug in Cocktail, but that only gets you so far. 

http://devforce.uservoice.com - http://devforce.uservoice.com




Posted By: gregweb
Date Posted: 09-Mar-2013 at 2:19pm
Hi Marcel,

Don't worry about this. I have been able to get what I want by using:

d:DataContext="{d:DesignInstance Type=designTime:DesignTimeViewModel, IsDesignTimeCreatable=True}"

All I do is create a DesignTimeViewModel with one property of an Entity. I just hand code a bit of data into the entity and it all shows up in the designer just fine.

So that's really all I need to lay out a view.

Greg



Print Page | Close Window