Clicking on 'X' on main window to trigger Closing event

Ribbon for WPF Forum

Posted 14 years ago by Bret Naughton
Version: 10.1.0521

Having a little trouble in trapping the event for clicking the main exit/close button on the ribbon bar... [I want to simulate the office products that close down the focused/primary tab and prompt for whether the file should be saved or not]

I was using the EventManager to trigger the closing event on the window, using the EventHandler Of CancelEventArgs, but I cannot get VB to recognise the closing event. Would appreciate it if there is an Actipro method for this.


Comments (1)

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Hi Bret,

Sorry but I'm not clear on what you are asking. To programmatically close a Window you should use its Close() method. Any time a Window is told it should close, the Closing event will fire and you can show any confirmation dialogs there. Then just set e.Cancel = true to prevent the Window from closing.

Actipro Software Support

The latest build of this product (v24.1.2) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.