Close smartpart view
I am developing windows Forms app开发者_开发问答lication, for this i am using SmartClient. Here i click workspace close('X') event at the time i want to display messageBox based on user input (OK/Cancel) i have to decide pane has to be close or not.
Use the ParentForm.FormClosing
event, and set the Cancel
property appropriately.
Subscribe to this event in the Load
event.
Aren't you using the Model-View-Presenter pattern? If you are, you can override the OnCloseView method of the form's presenter.
精彩评论