Hello, got a WPF problem:
I made a window with 3 textboxes (2x data inputs and 1x result), a combobox for operation choosing (+ - * /) and a button for calculating, like this:
a = double.Parse(textBox1.Text);
b = double.Parse(textBox2.Text);
switch (comboBox1.SelectedIndex)
{
case 0:
textBox3.Text = (a + b).ToString();
break;
and so on, - * /
Now, I added a menu with "close" button and I want to make an expandable menu button that does the same calculations as the stuff above, so I went with:
<Menu Height="26" HorizontalAlignment="Left" Name="menu1" VerticalAlignment="Top" Width="503">
<MenuItem Header="operations">
<MenuItem Header="+" />
<MenuItem Header="-" />
<MenuItem Header="*" />
<MenuItem Header="/" />
</MenuItem>
Can I link (possibly also by clicking) these menuitems to the button, like force an autoclick so that the correct operation is chosen and result is displayed as previously?
I'm pretty sure I saw a clickable tool to edit menuitems for that purpose, but I can't find it. I'm using ms visual c# 2008 express ed.