RockGuitarist1 RockGuitarist1 - 1 year ago 133
C# Question

Display AboutBox.cs from MainWindow's About_Click MenuItem

Probably a very simple solution to this, but this is the first time using a WPF. I want to click on my MenuItem called "About" from MainWindow's About_Click event and it open my AboutBox.cs form. This is what I have:


<MenuItem Header="About" Name="About" Click="About_Click"/>


private void About_Click(object sender, RoutedEventArgs e)
//This is not in the XAML code.

Apparently AboutBox.ShowDialog; isn't wanted. I know ShowDialog will not open a Class, but I am not sure how to open a Class that is defined as a Form.

Answer Source
var myAboutBox = new AboutBox();
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download