When I click on maximizebtn_Click and the form is maximized then loadbtn_Click doesn't click
private void maximizebtn_Click(object sender, RoutedEventArgs e) { // Set the window state to maximized if (WindowState == System.Windows.WindowState.Normal) { WindowState = System.Windows.WindowState.Maximized; } else { WindowState = System.Windows.WindowState.Normal; } } private void loadbtn_Click(object sender, RoutedEventArgs e) { // Create OpenFileDialog Microsoft.Win32.OpenFileDialog dlg = new Microsoft.Win32.OpenFileDialog(); // Set filter for file extension and default file extension dlg.DefaultExt = ".stl"; dlg.Filter = "STL Files|*.stl;"; // Display OpenFileDialog by calling ShowDialog method Nullable<bool> result = dlg.ShowDialog(); if (result == true) { // Open document string filename = dlg.FileName; openfile = filename; } ModelVisual3D device3D = new ModelVisual3D(); device3D.Content = Display3d(openfile); //Add the ModelVisual3D to the Children property of the HelixViewport3D viewPort3d.Children.Add(device3D); }
loadbtn_Click
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)