Print Page | Close Window

dialogresult and screen

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=3320
Printed Date: 28-Mar-2024 at 8:55am


Topic: dialogresult and screen
Posted By: pponzano
Subject: dialogresult and screen
Date Posted: 07-Mar-2012 at 7:37am
Hello,
how do I handle a screen showed by

  DialogOperationResult<DialogResult> res;

            yield return (res = dialogManager.ShowDialog(viewmodel, DialogButtons.YesNo));


I've the two buttons on the dialog...don't know how to attach code to them,
thanks



Replies:
Posted By: mgood
Date Posted: 07-Mar-2012 at 11:01am
DialogOperationResult<DialogResult> res;

yield return (res = dialogManager.ShowDialog(viewmodel, DialogButtons.YesNo));
if (res.DialogResult == DialogResult.Yes)
  // Code when Yes was clicked
else
  // Code when No was clicked



Print Page | Close Window