locked
Prism- Present User Control as a Modal Dialog RRS feed

  • Question

  • I am still getting the hang of prism so please excuse me if this is really simple.

    I have a User Control that has a View Model attached to it. A over simplified analogy might be a calculator where the user figures out the results and I just want the answer. I am looking to "pop" this control or show it in a modal dialog box, let the user interact with it and when it closes have access to the properties of the view model so I can get the results.

    So the question is how?

    I have used pop-ups in the past but the pop-up is tied to the current view model.  The dialog that needs to be shown has a decent amount of logic in the view model and needs to be used in several places in the application. 

    Can I do this with InteractionRequest?

    The scenario is this. The popup looks like a calculator that allows the users to enters prices or quanities.
    The user can they want a certain amount of something and I pop this dialog to get the int.
    Or they want to enter the amount of money so I pop the same dialog and get the double.

    And I would REALLY prefer not to pop a simple text box where they type in the amount.  This is for a touch screen app and that doesn't play well.

    Thanks

    Thursday, December 27, 2012 4:42 AM

Answers

  • I found a page that finally gives a good example of what I was looking for.

    Article on Subject

    In short the answer is yes, I can use InteractionRequest.  The long answer is, its harder than it first appeared.  After all the interfaces and classes I took from this example I managed it.

    • Marked as answer by Voast Dev Thursday, December 27, 2012 7:34 AM
    Thursday, December 27, 2012 7:34 AM

All replies

  • I found a page that finally gives a good example of what I was looking for.

    Article on Subject

    In short the answer is yes, I can use InteractionRequest.  The long answer is, its harder than it first appeared.  After all the interfaces and classes I took from this example I managed it.

    • Marked as answer by Voast Dev Thursday, December 27, 2012 7:34 AM
    Thursday, December 27, 2012 7:34 AM
  • Hi Voast Dev,

    Glad to hear that you have resolved your issue, on the other hand, I suggest you post Prism relative issue to this forum http://compositewpf.codeplex.com/discussions next time.

    Best regards,


    Sheldon _Xiao
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, December 28, 2012 5:45 AM