Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
次のようないくつかの WPF ウィンドウを作成しています。
flightWindow = new FlightWindow(txbNextFlight.Text, airline); flightWindow.Show();
そして、このウィンドウ内のボタンをクリックすると、ウィンドウが閉じます。これを解決する方法がわかりませんか?
using System; using System.Windows; namespace WpfApplication1 { public partial class FlightWindow : Window { public FlightWindow() { InitializeComponent(); } private void button1_Click(object sender, RoutedEventArgs e) { this.Close(); } } }