You can do this monitoring the Window_Closing event. Window x:Class="WPFApplDataGrid.Window1" xmlns=" schemas.microsoft.com/.../presentation" ; xmlns:x=" schemas.microsoft.com/.../xaml" ; xmlns:gl="clr-namespace:System.Globalization;assembly=mscorlib" Title="{Binding Titel}" Height="450" Width="650" WindowStartupLocation="CenterScreen" Closing="Window_Closing" method-id PBSchliessen_Click final private. * Button for Closing procedure division using by value sender as object e as type System.Windows.RoutedEventArgs. set PBSchliessenClick to true. invoke self::Close(). end method. method-id Window_Closing. procedure division using by value sender as object e as type System.ComponentModel.CancelEventArgs. if not PBSchliessenClick set e::Cancel to true end-if. end method. Werner Lanter
↧