-
-
Save jasondown/beb23b9b0048ac5221de44f66445b89a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ControlAddInExport("My Fancy Thing Addin Control")] | |
public class MyFancyThingAddinControl : WinFormsControlAddInBase | |
{ | |
private MyFancyThing _myFancyThing; | |
[ApplicationVisible] | |
// no need for null checks later | |
public event MethodInvoker ControlAddInReady = delegate { }; | |
protected override Control CreateControl() | |
{ | |
_myFancyThing = new MyFancyThing(); | |
_myFancyThing.ParentChanged += (sender, e) => ControlAddInReady(); | |
return _myFancyThing; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment