Quantcast
Channel: Visual COBOL
Viewing all articles
Browse latest Browse all 5819

Forum Post: RE: Prevent window closing

$
0
0
You can do this monitoring the Window_Closing event. Window x:Class="WPFApplDataGrid.Window1"        xmlns=" schemas.microsoft.com/.../presentation&quot ;        xmlns:x=" schemas.microsoft.com/.../xaml&quot ;        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

Viewing all articles
Browse latest Browse all 5819

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>