I'm just starting to learn C#, from years of using C.
I have a little panel for my app, it is going to repeat itself a number of time the user selects (it is a little addition testing program for my son; my first C# app - a GUI panel with 2 numbers and you enter the answer and get a new problem).
I added a ComboBox to let the user select the number of times to repeat 10, 20 , 30, ....
I'd like to set the default value to the first in the list, 10.
But, I can't figure out how to set it. When the user selects a value in the ComboBox I'd like to have that call a function.
When I created the ComboBox, this was created, and I added the line of code in it:
private void comboBox1_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
loop = 10 * (comboBox1.SelectedIndex);
}
but it doesn't hit it when I set a break point there. Is this what this function is for? Or do I need to create something else?
Sort of like the buttons I created that call functions.
I am using C# WFP with .Net, and have a Window1.xaml where I created the panel by dragging text boxes and buttons and the combobox from the controls and modifying the properties.
The buttons have a "Click" value in the XMAL under the designer window, but I can't figure out how to get something similar for the ComboBox.
Thanks for help.
(if I'm using the wrong terminology, please correct me on that too)