I am trying to take a single input from the user and delete some information form the grid which i display. So for this i want to raise a input box/dialog box which accepts the text and when i hit the button on the dialog box,i want to save the data.
Is it possible with out creating a new window or usercontrol ?
A message box is a dialog box that can be used to display textual information and to allow users to make decisions with buttons. The following figure shows a message box that asks a question and provides the user with three buttons to answer the question. To create a message box, you use the MessageBox class.
A StackPanel allows you to stack elements in a specified direction. By using properties that are defined on StackPanel, content can flow both vertically, which is the default setting, or horizontally.
Modal dialog boxes, which require the user to respond before continuing the program. Modeless dialog boxes, which stay on the screen and are available for use at any time but permit other user activities.
If you mean something like VB 6 Microsoft.VisualBasic.Interaction.InputBox
there is nothing out of the box for both WinForms and WPF.
But of course many people coming from Delphi and VB6 are missing this you can find a lot of ready solutions in the Internet, for instance: http://www.codeproject.com/KB/edit/InputBox.aspx
To my knowledge there is no built-in dialogue for input (aside from MessageBox
). You could create a window on the fly though if you do not want to subclass it. Just create a new window instance in code and set its Content
to have some default Buttons
(OK & Cancel) and a TextBox
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With