//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//------------------------------------------------------------------------------
/*
*/
namespace System.ComponentModel.Design {
using System.Diagnostics;
using System;
using System.ComponentModel;
using Microsoft.Win32;
using System.Reflection;
///
///
/// Provides methods to adjust the configuration of and retrieve
/// information about the services and behavior of a designer.
///
///
[System.Runtime.InteropServices.ComVisible(true)]
public interface IDesignerHost : IServiceContainer {
///
///
/// Gets or sets a value indicating whether the designer host
/// is currently loading the document.
///
///
bool Loading { get; }
///
/// Gets a value indicating whether the designer host is currently in a transaction.
///
bool InTransaction { get; }
///
///
/// Gets the container for this designer host.
///
///
IContainer Container { get; }
///
///
/// Gets the instance of the base class used as the base class for the current design.
///
///
IComponent RootComponent { get; }
///
///
/// Gets the fully qualified name of the class that is being designed.
///
///
string RootComponentClassName { get; }
///
///
/// Gets the description of the current transaction.
///
///
string TransactionDescription { get; }
///
///
/// Adds an event handler for the event.
///
///
event EventHandler Activated;
///
///
/// Adds an event handler for the event.
///
///
event EventHandler Deactivated;
///
///
/// Adds an event handler for the event.
///
///
event EventHandler LoadComplete;
///
///
/// Adds an event handler for the event.
///
///
event DesignerTransactionCloseEventHandler TransactionClosed;
///
/// Adds an event handler for the event.
///
event DesignerTransactionCloseEventHandler TransactionClosing;
///
/// Adds an event handler for the event.
///
event EventHandler TransactionOpened;
///
///
/// Adds an event handler for the event.
///
///
event EventHandler TransactionOpening;
///
///
/// Activates the designer that this host is hosting.
///
///
void Activate();
///
///
/// Creates a component of the specified class type.
///
///
IComponent CreateComponent(Type componentClass);
///
///
/// Creates a component of the given class type and name and places it into the designer container.
///
///
IComponent CreateComponent(Type componentClass, string name);
///
///
/// Lengthy operations that involve multiple components may raise many events. These events
/// may cause other side-effects, such as flicker or performance degradation. When operating
/// on multiple components at one time, or setting multiple properties on a single component,
/// you should encompass these changes inside a transaction. Transactions are used
/// to improve performance and reduce flicker. Slow operations can listen to
/// transaction events and only do work when the transaction completes.
///
///
DesignerTransaction CreateTransaction();
///
///
/// Lengthy operations that involve multiple components may raise many events. These events
/// may cause other side-effects, such as flicker or performance degradation. When operating
/// on multiple components at one time, or setting multiple properties on a single component,
/// you should encompass these changes inside a transaction. Transactions are used
/// to improve performance and reduce flicker. Slow operations can listen to
/// transaction events and only do work when the transaction completes.
///
///
DesignerTransaction CreateTransaction(string description);
///
///
/// Destroys the given component, removing it from the design container.
///
///
void DestroyComponent(IComponent component);
///
///
/// Gets the designer instance for the specified component.
///
///
IDesigner GetDesigner(IComponent component);
///
///
/// Gets the type instance for the specified fully qualified type name .
///
///
Type GetType(string typeName);
}
}