RockGuitarist1 RockGuitarist1 - 1 month ago 9x
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.

var myAboutBox = new AboutBox();