I’ve got a pretty simple problem, I think. I’m using WPF in Visual Basic 2010 (Express, but I don’t think that alters my question.)
I am creating a window that is a generic keypad for editing numerical values on a touchscreen. I would like to press an ‘edit’ button to create a copy of the keypad window/bring up a reusable version of the same window (I don’t care), but pass in parameters: the old value I’m manipulating, and a title to be displayed above the number pad.
I would like the user to be able to type in the new value, then press the ‘done’ key to submit this value and have it sent back to the main application window into my custom control that contains a text box.
(I have the number pad’s layout sorted out already; I’m already using a variation on it to set a global password ‘access level’. It’s getting the information in and out that has me scratching my head.)
If I were calling a function, it would be this simple:
textBoxValue = changeMyValue("window title", oldTextBoxValue)
But when it becomes a window class, I get a bit confused.
Thanks for any help!
Just create a method which creates a window, gets the value and passes it back. e.g.
Assumes that you need an
intand that the dialog does some conversion and exposes the value in a property calledValue.