I have a WPF Application which contains a class called RateView.xaml.cs and MainWindow.xaml.cs
The MainWindow.xaml.cs contains three textboxes of which values I want to pass into the RateView.xaml.cs. The content of these textboxes can be changed by the end user but regardless of that I always want whatever the value is of the textbox to be going into rateview.xaml.cs.
How can this be done?
I am a newbie to coding hence not sure, someone mentioned Get and Set statements, if so how can I do these?
Currently I access my textboxes like this in the MainWindow:
private float GetSomeNumber()
{
bool Number1 = false;
float parsedNumber1Value = 0.00F;
Number1 = float.TryParse(Number1_TextBox.Text, out parsedNumber1Value);
return parsedNumber1Value;
}
The GetSomeNumber() method is then passed to another seperate class to do some calculation with.
On intital load it works of the value from my method, but once someone changes the value rateview.xaml.cs doesn't recognise this change and always uses the values that were first loaded.
Thanks