[Resolved] CMContrib & Caliburn, issues with DialogBox;

Topics: Getting Started
Jul 26, 2013 at 9:52 AM
Edited Jul 26, 2013 at 9:55 AM
I'm new in the world of C#, and Caliburn.Micro and any otherthing, but i'm learning :).

anyway, I try to use the Caliburn.Micro.Contrib DialogBox out of th box, and I'm having issues to display it.

In the first step , I just want to display a Yes-No DialogBox, before removing an item from my datagrid.
I have the following code :

In the code :
   public IEnumerable<IResult> DeleteItem()
        {
            var question = new Question("Test", Answer.Yes, Answer.No);
            _windowManager.ShowDialog(question);
            yield return question.AsResult();
            var q = question.AsResult();
        }
However, when I click on the binded button, I'm getting a windows with the message :
Cannot find view for Contrib.Micro.Contrib.Dialogs.Question.

So question: What am I missing ? how to make this work ?

If something can supply a real example of this, it could be nice (I try to go through the sample provided by CMContrib owner, but I can't make anything of it).

Thanks in avance.
Jul 26, 2013 at 12:47 PM
Have you added Caliburn.Micro.Contrib dll to assembly source, overriding SelectAssemblies in your bootstrapper?

I get hit with that every time :-)
Jul 26, 2013 at 1:56 PM
Yes i have done that as well, but no luck !
Jul 30, 2013 at 11:50 AM
Here what I have in my bootstrap
  protected override IEnumerable<Assembly> SelectAssemblies()
        {
            return base.SelectAssemblies().Concat(new Assembly[] { typeof(ResultExtensions).Assembly });
        }
and how i (try) to display the dialog
public IEnumerabl<IResult> Execute(){
var question = new Question("The Subject",
        "The Message",
        Answer.Yes,
        Answer.No);

        yield return question.AsResult().CancelOnResponse(Answer.No);
}
but still no luck of making this work
Aug 1, 2013 at 7:08 AM
The answer lies here : http://stackoverflow.com/questions/17947891/using-caliburn-micro-contrib-generic-dialogbox

I had to call the FrameworkExtensions.ViewLocator.EnableContextFallback(), now its working