File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed
Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change 22{
33 internal interface IWindowClosing
44 {
5- /// <summary>
6- /// Implements logic to execute when the window is closing.
7- /// </summary>
8- /// <returns>true if the window closing should be canceled; otherwise, false.</returns>
95 public bool OnClosing ( ) ;
106 }
117}
Original file line number Diff line number Diff line change 1- using System . Windows ;
1+ using System ;
2+ using System . ComponentModel ;
3+ using System . Windows ;
24using Microsoft . Extensions . DependencyInjection ;
35using AlterApp . ViewModels . Interfaces ;
46using AlterApp . ViewModels ;
@@ -16,15 +18,15 @@ public MainWindow()
1618 DataContext = App . Current . Services . GetService < MainWindowViewModel > ( ) ;
1719 }
1820
19- private void Window_Closing ( object sender , System . ComponentModel . CancelEventArgs e )
21+ private void Window_Closing ( object sender , CancelEventArgs e )
2022 {
2123 if ( DataContext is IWindowClosing dataContext )
2224 {
2325 e . Cancel = dataContext . OnClosing ( ) ;
2426 }
2527 }
2628
27- private void Window_ContentRendered ( object sender , System . EventArgs e )
29+ private void Window_ContentRendered ( object sender , EventArgs e )
2830 {
2931 if ( DataContext is IWindowContentRendered dataContext )
3032 {
You can’t perform that action at this time.
0 commit comments