views:

63

answers:

1

I have a custom WinForms ActiveX toolbar control that I want to add to a WPF form. One of the options on the toolbar is to exit the current application.

How can I make the control raise/bubble an event to close the WPF window that contains the control?

A: 

Whatever the technology of your toolbar control, there must be some way to associate a toolbar element click with code in your application (via a delegate, event, etc.). Create a method that closes your application and associate it with this toolbar element. See the docs for the Application.Shutdown method for more explanation on terminating the WPF app (including the ShutdownMode enum).

Timores