This question is locked. New answers and comments are not allowed.
Hi,
(Silverlight v4, RadControls Q1 2011)
I want to use Confirm & Prompt windows to behave similar to default Message box. That is, whenever the message box is displayed by calling the Show function, the code following the call is not executed until the user responds.
I've a function which returns value based on the confirmation/Prompt. When using RadWindow's Confirm, the function returns before user responds. I'm implementing an IView interface which has functions like Prompt, Confirm & Alert. The interface is implemented to interact with users in Command line mode, Windows Mode (Normal Messagebox) & Telerik Mode.
The behavior of the other two implementation (CommandLine & Windows) is same. I want telerik implementation to match with the other two. Is there a way where I can stall execution of function until user responds?
Below is code snippet of CommandLine & Windows implementation. I want to match the Telerik's implementation to match this.
Thanks
(Silverlight v4, RadControls Q1 2011)
I want to use Confirm & Prompt windows to behave similar to default Message box. That is, whenever the message box is displayed by calling the Show function, the code following the call is not executed until the user responds.
I've a function which returns value based on the confirmation/Prompt. When using RadWindow's Confirm, the function returns before user responds. I'm implementing an IView interface which has functions like Prompt, Confirm & Alert. The interface is implemented to interact with users in Command line mode, Windows Mode (Normal Messagebox) & Telerik Mode.
The behavior of the other two implementation (CommandLine & Windows) is same. I want telerik implementation to match with the other two. Is there a way where I can stall execution of function until user responds?
Below is code snippet of CommandLine & Windows implementation. I want to match the Telerik's implementation to match this.
//CommandLine Implementation
public
CustomConfirmResult Confirm(
string
message) {
Console.WriteLine(message);
Console.WriteLine(
"[Y]es [N]o"
);
string
s = Console.ReadLine();
if
(s == y || s == Y)
return
CustomConfirmResult.Yes;
else
return
CustomConfirmResult.No;
}
//Windows Implementation
public
CustomConfirmResult Confirm(
string
message) {
MessageBoxResult mbr = MessageBox.Show(
""
,
""
, MessageBoxButton.OKCancel);
if
(mbr == MessageBoxResult.OK)
return
CustomConfirmResult.Yes;
else
return
CustomConfirmResult.No;
}
Thanks