ActivityToolboxItem Classe
Definição
Cuidado
The System.Workflow.* types are deprecated. Instead, please use the new types from System.Activities.*
Fornece uma classe base para todos os itens da caixa de ferramentas associados a uma atividade em um designer de fluxo de trabalho.Provides a base class for all toolbox items associated with an activity in a workflow designer.
public ref class ActivityToolboxItem : System::Drawing::Design::ToolboxItem
[System.Serializable]
public class ActivityToolboxItem : System.Drawing.Design.ToolboxItem
[System.Serializable]
[System.Obsolete("The System.Workflow.* types are deprecated. Instead, please use the new types from System.Activities.*")]
public class ActivityToolboxItem : System.Drawing.Design.ToolboxItem
[<System.Serializable>]
type ActivityToolboxItem = class
inherit ToolboxItem
[<System.Serializable>]
[<System.Obsolete("The System.Workflow.* types are deprecated. Instead, please use the new types from System.Activities.*")>]
type ActivityToolboxItem = class
inherit ToolboxItem
Public Class ActivityToolboxItem
Inherits ToolboxItem
- Herança
- Atributos
Exemplos
O exemplo a seguir mostra uma ActivityToolboxItem classe completa para uma atividade personalizada.The following example shows a complete ActivityToolboxItem class for a custom activity. Neste exemplo, o CreateComponentsCore método é substituído para posicionar 2 atividades personalizadas em um ParallelActivity .In this example, the CreateComponentsCore method is overridden in order to place 2 custom activities within a ParallelActivity.
[Serializable]
internal sealed class CustomActivityToolboxItem : ActivityToolboxItem
{
public CustomActivityToolboxItem(Type type)
: base(type)
{
}
private CustomActivityToolboxItem(SerializationInfo info, StreamingContext context)
{
Deserialize(info, context);
}
protected override IComponent[] CreateComponentsCore(IDesignerHost designerHost)
{
CompositeActivity parallel = new ParallelActivity();
parallel.Activities.Add(new CustomActivity());
parallel.Activities.Add(new CustomActivity());
return new IComponent[] { parallel };
}
}
<Serializable()> _
Friend Class CustomActivityToolboxItem
Inherits ActivityToolboxItem
Public Sub New(ByVal type As Type)
MyBase.new(type)
End Sub
Private Sub New(ByVal info As SerializationInfo, ByVal context As StreamingContext)
Deserialize(info, context)
End Sub
Protected Overrides Function CreateComponentsCore(ByVal designerHost As IDesignerHost) As IComponent()
Dim parallel As New ParallelActivity()
parallel.Activities.Add(New CustomActivity())
parallel.Activities.Add(New CustomActivity())
Return New IComponent() {parallel}
End Function
End Class
Comentários
Observação
Este material discute tipos e namespaces obsoletos.This material discusses types and namespaces that are obsolete. Para obter mais informações, consulte Deprecated Types in Windows Workflow Foundation 4.5 (Tipos preteridos no Windows Workflow Foundation 4.5).For more information, see Deprecated Types in Windows Workflow Foundation 4.5.
Todos os itens da caixa de ferramentas associados a uma Activity classe são derivados de ActivityToolboxItem .All toolbox items associated with an Activity class are derived from ActivityToolboxItem. Essa classe exibe uma representação gráfica de uma Activity classe na caixa de ferramentas de um ambiente de tempo de design e cria uma instância da Activity classe à qual ela está associada quando um usuário a arrasta para a superfície de design.This class displays a graphical representation of an Activity class in the toolbox of a design-time environment and creates an instance of the Activity class it is associated with when a user drags it onto the design surface. O item da caixa de ferramentas de atividade normalmente representa uma atividade a ser criada quando invocada em um documento no modo de design.The activity toolbox item typically represents an activity to create when invoked on a design-mode document.
Essa classe herda diretamente da ToolboxItem classe.This class inherits directly from the ToolboxItem class.
Construtores
| ActivityToolboxItem() |
Inicializa uma nova instância da classe ActivityToolboxItem.Initializes a new instance of the ActivityToolboxItem class. |
| ActivityToolboxItem(SerializationInfo, StreamingContext) |
Inicializa uma nova instância da classe ActivityToolboxItem usando o SerializationInfo e o StreamingContext.Initializes a new instance of the ActivityToolboxItem class by using the specified SerializationInfo and StreamingContext. |
| ActivityToolboxItem(Type) |
Inicializa uma nova instância da classe ActivityToolboxItem que cria o tipo especificado do componente Activity.Initializes a new instance of the ActivityToolboxItem class that creates the specified type of Activity component. |
Propriedades
| AssemblyName |
Obtém ou define o nome do assembly que contém o tipo ou os tipos que o item de caixa de ferramentas cria.Gets or sets the name of the assembly that contains the type or types that the toolbox item creates. (Herdado de ToolboxItem) |
| Bitmap |
Obtém ou define um bitmap para representar o item de caixa de ferramentas na caixa de ferramentas.Gets or sets a bitmap to represent the toolbox item in the toolbox. (Herdado de ToolboxItem) |
| Company |
Obtém ou define o nome da empresa para este ToolboxItem.Gets or sets the company name for this ToolboxItem. (Herdado de ToolboxItem) |
| ComponentType |
Obtém o tipo de componente para este ToolboxItem.Gets the component type for this ToolboxItem. (Herdado de ToolboxItem) |
| DependentAssemblies |
Obtém ou define o AssemblyName para o item de caixa de ferramentas.Gets or sets the AssemblyName for the toolbox item. (Herdado de ToolboxItem) |
| Description |
Obtém ou define a descrição para este ToolboxItem.Gets or sets the description for this ToolboxItem. (Herdado de ToolboxItem) |
| DisplayName |
Obtém ou define o nome de exibição desse item de caixa de ferramentas.Gets or sets the display name for the toolbox item. (Herdado de ToolboxItem) |
| Filter |
Obtém ou define o filtro que determina se o item de caixa de ferramentas pode ser usado em um componente de destino.Gets or sets the filter that determines whether the toolbox item can be used on a destination component. (Herdado de ToolboxItem) |
| IsTransient |
Obtém um valor que indica se o item de caixa de ferramentas é transitório.Gets a value indicating whether the toolbox item is transient. (Herdado de ToolboxItem) |
| Locked |
Obtém um valor que indica se o ToolboxItem está bloqueado no momento.Gets a value indicating whether the ToolboxItem is currently locked. (Herdado de ToolboxItem) |
| OriginalBitmap |
Obtém ou define o bitmap original que será usado na caixa de ferramentas para este item.Gets or sets the original bitmap that will be used in the toolbox for this item. (Herdado de ToolboxItem) |
| Properties |
Obtém um dicionário de propriedades.Gets a dictionary of properties. (Herdado de ToolboxItem) |
| TypeName |
Obtém ou define o nome totalmente qualificado do tipo de IComponent que o item de caixa de ferramentas cria quando invocado.Gets or sets the fully qualified name of the type of IComponent that the toolbox item creates when invoked. (Herdado de ToolboxItem) |
| Version |
Obtém a versão desta ToolboxItem.Gets the version for this ToolboxItem. (Herdado de ToolboxItem) |
Métodos
| CheckUnlocked() |
Gera uma exceção se o item de caixa de ferramentas está bloqueado no momento.Throws an exception if the toolbox item is currently locked. (Herdado de ToolboxItem) |
| CreateComponents() |
Cria os componentes que o item de caixa de ferramentas está configurado para criar.Creates the components that the toolbox item is configured to create. (Herdado de ToolboxItem) |
| CreateComponents(IDesignerHost) |
Cria os componentes que o item de caixa de ferramentas está configurado para criar, usando o host de designer especificado.Creates the components that the toolbox item is configured to create, using the specified designer host. (Herdado de ToolboxItem) |
| CreateComponents(IDesignerHost, IDictionary) |
Cria os componentes que o item de caixa de ferramentas está configurado para criar, usando o host de designer especificado e os valores padrão.Creates the components that the toolbox item is configured to create, using the specified designer host and default values. (Herdado de ToolboxItem) |
| CreateComponentsCore(IDesignerHost) |
Cria um componente Activity ou uma matriz de componentes Activity quando o item de caixa de ferramentas é invocado.Creates an Activity component or an array of Activity components when the toolbox item is invoked. |
| CreateComponentsCore(IDesignerHost, IDictionary) |
Cria uma matriz de componentes quando o item de caixa de ferramentas é invocado.Creates an array of components when the toolbox item is invoked. (Herdado de ToolboxItem) |
| CreateComponentsWithUI(IDesignerHost) |
Cria um componente Activity ou uma matriz de componentes Activity que geram uma caixa de diálogo na superfície de design quando o item de caixa de ferramentas é invocado.Creates an Activity component or an array of Activity components that generate a dialog box on the design surface when the toolbox item is invoked. |
| Deserialize(SerializationInfo, StreamingContext) |
Carrega o estado do item da caixa de ferramentas do objeto de informações de serialização especificado.Loads the state of the toolbox item from the specified serialization information object. (Herdado de ToolboxItem) |
| Equals(Object) |
Determina se duas instâncias ToolboxItem são iguais.Determines whether two ToolboxItem instances are equal. (Herdado de ToolboxItem) |
| FilterPropertyValue(String, Object) |
Filtra um valor da propriedade antes de retorná-lo.Filters a property value before returning it. (Herdado de ToolboxItem) |
| GetHashCode() |
Retorna o código hash para a instância.Returns the hash code for this instance. (Herdado de ToolboxItem) |
| GetToolboxDisplayName(Type) |
Obtém o nome de exibição associado do item de caixa de ferramentas na caixa de ferramentas.Gets the associated display name for the Toolbox item in the Toolbox. |
| GetToolboxImage(Type) |
Obtém a imagem associada que é usada para representar o item de caixa de ferramentas na caixa de ferramentas.Gets the associated Image that is used to represent the Toolbox item in the Toolbox. |
| GetType() |
Obtém o Type da instância atual.Gets the Type of the current instance. (Herdado de Object) |
| GetType(IDesignerHost) |
Habilita o acesso ao tipo associado ao item de caixa de ferramentas.Enables access to the type associated with the toolbox item. (Herdado de ToolboxItem) |
| GetType(IDesignerHost, AssemblyName, String, Boolean) |
Cria uma instância do tipo especificado, opcionalmente usando um nome de assembly e host de designer especificados.Creates an instance of the specified type, optionally using a specified designer host and assembly name. (Herdado de ToolboxItem) |
| Initialize(Type) |
Inicializa o item de caixa de ferramentas atual com o tipo especificado a ser criado.Initializes the current toolbox item with the specified type to create. (Herdado de ToolboxItem) |
| Lock() |
Bloqueia o item de caixa de ferramentas e impede alterações em suas propriedades.Locks the toolbox item and prevents changes to its properties. (Herdado de ToolboxItem) |
| MemberwiseClone() |
Cria uma cópia superficial do Object atual.Creates a shallow copy of the current Object. (Herdado de Object) |
| OnComponentsCreated(ToolboxComponentsCreatedEventArgs) |
Aciona o evento ComponentsCreated.Raises the ComponentsCreated event. (Herdado de ToolboxItem) |
| OnComponentsCreating(ToolboxComponentsCreatingEventArgs) |
Aciona o evento ComponentsCreating.Raises the ComponentsCreating event. (Herdado de ToolboxItem) |
| Serialize(SerializationInfo, StreamingContext) |
Salva o estado do item da caixa de ferramentas para o objeto de informações de serialização especificado.Saves the state of the toolbox item to the specified serialization information object. (Herdado de ToolboxItem) |
| ToString() |
Retorna um valor String que representa o ToolboxItem atual.Returns a String that represents the current ToolboxItem. (Herdado de ToolboxItem) |
| ValidatePropertyType(String, Object, Type, Boolean) |
Valida que um objeto é de um determinado tipo.Validates that an object is of a given type. (Herdado de ToolboxItem) |
| ValidatePropertyValue(String, Object) |
Valida uma propriedade antes de ela ser atribuída ao dicionário de propriedades.Validates a property before it is assigned to the property dictionary. (Herdado de ToolboxItem) |
Eventos
| ComponentsCreated |
Ocorre imediatamente após a criação de componentes.Occurs immediately after components are created. (Herdado de ToolboxItem) |
| ComponentsCreating |
Ocorre quando os componentes estão prestes a ser criados.Occurs when components are about to be created. (Herdado de ToolboxItem) |
Implantações explícitas de interface
| ISerializable.GetObjectData(SerializationInfo, StreamingContext) |
Para obter uma descrição desse membro, consulte o método GetObjectData(SerializationInfo, StreamingContext).For a description of this member, see the GetObjectData(SerializationInfo, StreamingContext) method. (Herdado de ToolboxItem) |