Skip to content
Discussion options

You must be logged in to vote

The DialogPage class (which UIElementDialogPage inherits from) contains some methods that you can override to be notified about the different lifecycle events.

Action Method
View your page OnActivate()
Leave your page OnDeactivate()
Click Cancel OnClosed() (note that OnDeactivate() is not called if your page is currently the active page)
Click OK
  1. OnDeactivate() (only called if your page is currently the active page)
  2. OnApply()
  3. OnClosed()

So you should be able to override the OnApply() method and perform your saving in there.

Just remember that only one instance of your UserControl is created, no matter how many times you open and close the Options dialog. To account for that,…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by MattE303
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants