I add a window class in my WPF project as below:
public partial class ParameterInput : Window
{
public ParameterInput()
{
InitializeComponent();
}
public void show()
{
bool ac= Activate();
}
}
And I do create a object of this class, and I hope it can be activated.
void myTap(object sender, MouseButtonEventArgs e)
{
ParameterInput ParameterInputDialog= new ParameterInput();
ParameterInputDialog.show();
//bool ac = ParameterInputDialog.Activate();
}
But I find this method do not work, the return value (ac) is false. why? Do anybody know how to solve this problem? I just want to open the dialog which I defined.