8

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 ?

StayOnTarget
  • 11,743
  • 10
  • 52
  • 81
Macnique
  • 1,028
  • 2
  • 19
  • 44

2 Answers2

5

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

StayOnTarget
  • 11,743
  • 10
  • 52
  • 81
michalczerwinski
  • 1,069
  • 9
  • 6
3

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.

H.B.
  • 166,899
  • 29
  • 327
  • 400