Im trying to make a WPF based program that will read the textbox input (user input) from a usercontrol and save it as a object
proprety. The usercontrol is added to MainWindow
. From MainWindow
, you have a button which displays a message box with the textbox value. I'm not sure how to connect it all.
Error = CS0103 The name 'minJpValue' does not exist in the current context WpfApp1
Please help
(Usercontrol .xaml code)
<TextBox x:Name="minJpValue"/>
(Custom class)
public class jpData { public double minJpValue { get { return minJpValue; } set { minJpValue = value; } } }
(MainWindow .cs code)
private void clickclick(object sender, RoutedEventArgs e) { MessageBox.Show(minJpValue); }