Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
interface System.​ComponentModel.​Design.​IDesignerHost
Assembly: System.ComponentModel.TypeConverter
Implemented Interfaces
- IServiceContainer (Inherits: IServiceProvider)
Provides an interface for managing designer transactions and components.
Properties
Container
Gets the container for this designer host.
bool
InTransaction
Gets a value indicating whether the designer host is currently in a transaction.
bool
Loading
Gets a value indicating whether the designer host is currently loading the document.
RootComponent
Gets the instance of the base class used as the root component for the current design.
string
RootComponentClassName
Gets the fully qualified name of the class being designed.
string
TransactionDescription
Gets the description of the current transaction.
Methods
void
Activate​()
Activates the designer that this host is hosting.
CreateComponent​(Type componentClass)
Creates a component of the specified type and adds it to the design document.
Returns The newly created component.
componentClass
The type of the component to create.
CreateComponent​(Type componentClass,
string name)
Creates a component of the specified type and name, and adds it to the design document.
Returns The newly created component.
componentClass
The type of the component to create.
name
The name for the component.
CreateTransaction​()
Creates a <see cref="T:System.ComponentModel.Design.DesignerTransaction" /> that can encapsulate event sequences to improve performance and enable undo and redo support functionality.
Returns A new instance of <see cref="T:System.ComponentModel.Design.DesignerTransaction" /> . When you complete the steps in your transaction, you should call <see cref="M:System.ComponentModel.Design.DesignerTransaction.Commit" /> on this object.
CreateTransaction​(string description)
Creates a <see cref="T:System.ComponentModel.Design.DesignerTransaction" /> that can encapsulate event sequences to improve performance and enable undo and redo support functionality, using the specified transaction description.
Returns A new <see cref="T:System.ComponentModel.Design.DesignerTransaction" /> . When you have completed the steps in your transaction, you should call <see cref="M:System.ComponentModel.Design.DesignerTransaction.Commit" /> on this object.
description
A title or description for the newly created transaction.
void
DestroyComponent​(IComponent component)
Destroys the specified component and removes it from the designer container.
component
The component to destroy.
GetDesigner​(IComponent component)
Gets the designer instance that contains the specified component.
Returns An <see cref="T:System.ComponentModel.Design.IDesigner" /> , or <see langword="null" /> if there is no designer for the specified component.
component
The <see cref="T:System.ComponentModel.IComponent" /> to retrieve the designer for.
GetType​(string typeName)
Gets an instance of the specified, fully qualified type name.
Returns The type object for the specified type name, or <see langword="null" /> if the type cannot be found.
typeName
The name of the type to load.