Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Build an input dialog box?

I understand that there is no default input dialog in silverlight for windows phone 7. But i need this for my project.

I want it to have the same metro look as the default messagebox class. Whats the easiest way to do this? Can i extend the messagebox class and add som kind of textfield to it? Or should i perhaps use popup or child window?

Please help my out on this one guys :) Stack overflow has been a great asset and has helped me alot when I get stuck in my projects!

like image 937
Richard Avatar asked Apr 16 '11 14:04

Richard


People also ask

What method is used to create an input dialog box?

An input dialog box is a simple GUI-based input that can be created by using the showInputDialog method defined in the JOptionPane class.

How do you create an input dialog box in Python?

The simplest way to do it is to set an input equal to a variable for later use, and then call the variable later in the program. variable = str(input("Type into the text box."))

What is input dialog box?

2.6 Dialog Boxes for Input /Output A dialog box is a small graphical window that displays a message to the user or requests input. Two of the dialog boxes are: – Message Dialog - a dialog box that displays a message. Input Dialog - a dialog box that prompts the user for input.

How do you create a dialogue box in Java?

Creating a standard dialog is as simple as applying one the following methods to JOptionPane: showMessageDialog or showOptionDialog. The showMessageDialog method creates a basic one-button dialog box.


1 Answers

You could use InputPrompt from the Coding4Fun Toolkit:

InputPrompt prompt = new InputPrompt();
prompt.Title = "Here Is A Title";
prompt.Message = "Specify a unique message:";
prompt.Show();

prompt.Completed += (pResult,sResult) =>
    {
    }

Or you could use the CustomMessageBox from WPToolkit:

CustomMessageBox box = new CustomMessageBox()
{
    Caption = "Your Caption Here",
    Message = "Enter a unique message",
    LeftButtonContent = "ok",
    RightButtonContent = "cancel",
    Content = textBox    
};

box.Dismissed += (s, boxEventArgs) =>
    {
    }

box.Show();

Both are great options and at the end of the day it will be a matter of preference as to which one to use for your specific case.

like image 86
Den Delimarsky Avatar answered Oct 09 '22 22:10

Den Delimarsky