In creating my own custom ParentControlDesigner
, my public override void Initialize( IComponent component )
processes these interfaces for working with the designer window
ISelectionService service = (ISelectionService)this.GetService( typeof( ISelectionService ) );
if ( service != null )
service.Selection开发者_Go百科Changed += new EventHandler( this.OnSelectionChanged );
IComponentChangeService service2 = (IComponentChangeService)this.GetService( typeof( IComponentChangeService ) );
if ( service2 != null )
service2.ComponentChanged += new ComponentChangedEventHandler( this.OnComponentChanged );
I was wondering if someone knew any classes that implemented the ISelectionService
and IComponentChangeService
. I want to see how they are built and possibly referenced. In googling ISelectionService
, I got a number of linked to either a definition or the Initialization
implementation but no links to a class that actually implements ISelectionService
.
Here are two good articles on how to host the Visual Studio forms designer in your own application. These may give you the information you need.
- On MSDN
- On DivElements
精彩评论