ActivityDesigner ActivityDesigner ActivityDesigner ActivityDesigner Class

定義

警告

此 API 現已淘汰。

為所有的活動設計工具元件提供強制基底類別 (Base Class)。Provides a mandatory base class for all activity designer components.

public ref class ActivityDesigner : IDisposable, System::ComponentModel::Design::IDesignerFilter, System::ComponentModel::Design::IRootDesigner, System::Drawing::Design::IToolboxUser, System::Workflow::ComponentModel::Design::IPersistUIState, System::Workflow::ComponentModel::Design::IWorkflowRootDesigner
[System.Obsolete("The System.Workflow.* types are deprecated.  Instead, please use the new types from System.Activities.*")]
[System.Workflow.ComponentModel.Design.ActivityDesignerTheme(typeof(System.Workflow.ComponentModel.Design.ActivityDesignerTheme))]
public class ActivityDesigner : IDisposable, System.ComponentModel.Design.IDesignerFilter, System.ComponentModel.Design.IRootDesigner, System.Drawing.Design.IToolboxUser, System.Workflow.ComponentModel.Design.IPersistUIState, System.Workflow.ComponentModel.Design.IWorkflowRootDesigner
type ActivityDesigner = class
    interface IDisposable
    interface IDesignerFilter
    interface IDesigner
    interface IToolboxUser
    interface IPersistUIState
    interface IWorkflowRootDesigner
    interface IRootDesigner
Public Class ActivityDesigner
Implements IDesignerFilter, IDisposable, IPersistUIState, IRootDesigner, IToolboxUser, IWorkflowRootDesigner
繼承
ActivityDesignerActivityDesignerActivityDesignerActivityDesigner
衍生
屬性
實作

範例

下列範例顯示自訂活動的 ActivityDesigner 完整實作。The following example shows a complete implementation of an ActivityDesigner for a custom activity. 設計工具擁有一個旗標,這個旗標可以切換以允許 ActivityDesigner 基底類別控制繪製或利用 ActivityDesignerPaint 類別用來繪製活動的各種方法。The designer has a flag that can be toggled to allow the base class ActivityDesigner to control the painting or to utilize the various methods the ActivityDesignerPaint class to draw the activity.

[ActivityDesignerTheme(typeof(CustomCompositeActivityDesignerTheme))]
public class CustomActivityDesigner : ActivityDesigner
{
    public override bool CanBeParentedTo(CompositeActivityDesigner parentActivityDesigner)
    {
        if (parentActivityDesigner.GetType().ToString() == "System.Workflow.Activities.IfElseBranchDesigner")
            return false;

        return true;
    }

    private ActivityDesignerVerbCollection verbs = null;

    protected override ActivityDesignerVerbCollection Verbs
    {
        get
        {
            if (this.verbs == null)
                CreateActivityVerbs();

            return this.verbs;
        }
    }

    private void CreateActivityVerbs()
    {
        this.verbs = new ActivityDesignerVerbCollection();

        ActivityDesignerVerb addBranchVerb = new ActivityDesignerVerb(this,
            DesignerVerbGroup.View, "Add New Parallel Branch", new EventHandler(OnAddParallelBranch));
        this.verbs.Clear();

        this.verbs.Add(addBranchVerb);
    }

    protected void OnAddParallelBranch(object sender, EventArgs e)
    {
        // Code for adding a new branch to the parallel activity goes here
    }

    protected override Rectangle ImageRectangle
    {
        get
        {
            Rectangle bounds = this.Bounds;
            Size sz = new Size(24, 24);

            Rectangle imageRect = new Rectangle();
            imageRect.X = bounds.Left + ((bounds.Width - sz.Width) / 2);
            imageRect.Y = bounds.Top + 4;
            imageRect.Size = sz;

            return imageRect;
        }
    }

    protected override Rectangle TextRectangle
    {
        get
        {
            return new Rectangle(
                this.Bounds.Left + 2,
                this.ImageRectangle.Bottom,
                this.Bounds.Width - 4,
                this.Bounds.Height - this.ImageRectangle.Height - 1);
        }
    }

    protected override void Initialize(Activity activity)
    {
        base.Initialize(activity);
        Bitmap bmp = Resources.ToolboxImage;
        bmp.MakeTransparent();
        this.Image = bmp;
    }

    readonly static Size BaseSize = new Size(64, 64);
    protected override Size OnLayoutSize(ActivityDesignerLayoutEventArgs e)
    {
        return BaseSize;
    }

    private bool expanded = true;
    private bool useBasePaint = false;

    public bool UseBasePaint
    {
        get { return this.useBasePaint; }
        set { this.useBasePaint = value; }
    }

    public bool Expanded
    {
        get { return this.expanded; }
        set { this.expanded = value; }
    }

    protected override void OnPaint(ActivityDesignerPaintEventArgs e)
    {
        if (this.UseBasePaint == true)
        {
            base.OnPaint(e);
            return;
        }

        DrawCustomActivity(e);
    }

    private void DrawCustomActivity(ActivityDesignerPaintEventArgs e)
    {
        Graphics graphics = e.Graphics;

        CompositeDesignerTheme compositeDesignerTheme = (CompositeDesignerTheme)e.DesignerTheme;

        ActivityDesignerPaint.DrawRoundedRectangle(graphics, compositeDesignerTheme.BorderPen, this.Bounds, compositeDesignerTheme.BorderWidth);

        string text = this.Text;
        Rectangle textRectangle = this.TextRectangle;
        if (!String.IsNullOrEmpty(text) && !textRectangle.IsEmpty)
        {
            ActivityDesignerPaint.DrawText(graphics, compositeDesignerTheme.Font, text, textRectangle, StringAlignment.Center, e.AmbientTheme.TextQuality, compositeDesignerTheme.ForegroundBrush);
        }

        System.Drawing.Image image = this.Image;
        Rectangle imageRectangle = this.ImageRectangle;
        if (image != null && !imageRectangle.IsEmpty)
        {
            ActivityDesignerPaint.DrawImage(graphics, image, imageRectangle, DesignerContentAlignment.Fill);
        }

        ActivityDesignerPaint.DrawExpandButton(graphics,
            new Rectangle(this.Location.X, this.Location.Y, 10, 10),
            this.Expanded,
            compositeDesignerTheme);
    }
}
<ActivityDesignerTheme(GetType(CustomCompositeActivityDesignerTheme))> _
Public Class CustomActivityDesigner
    Inherits ActivityDesigner

   
    Public Overrides Function CanBeParentedTo(ByVal parentActivityDesigner As CompositeActivityDesigner) As Boolean
        If parentActivityDesigner.GetType().ToString() = "System.Workflow.Activities.IfElseBranchDesigner" Then
            Return False
        End If
        Return True
    End Function

    Private verbsValue As ActivityDesignerVerbCollection = Nothing

    Protected Overrides ReadOnly Property Verbs() As ActivityDesignerVerbCollection
        Get
            If verbsValue Is Nothing Then
                CreateActivityVerbs()
            End If
            Return Me.verbsValue

        End Get
    End Property

    Private Sub CreateActivityVerbs()
        Me.verbsValue = New ActivityDesignerVerbCollection()

        Dim addBranchVerb As New ActivityDesignerVerb(Me, DesignerVerbGroup.View, "Add New Parallel Branch", AddressOf OnAddParallelBranch)

        Me.verbsValue.Clear()

        Me.verbsValue.Add(addBranchVerb)
    End Sub

    Protected Sub OnAddParallelBranch(ByVal sender As Object, ByVal e As EventArgs)
        ' Code for adding a new branch to the parallel activity goes here
    End Sub

    Protected Overrides ReadOnly Property ImageRectangle() As Rectangle

        Get
            Dim Bounds As Rectangle = Me.Bounds
            Dim sz As New Size(24, 24)

            Dim imageRect As New Rectangle()
            imageRect.X = Bounds.Left + ((Bounds.Width - sz.Width) / 2)
            imageRect.Y = Bounds.Top + 4
            imageRect.Size = sz

            Return imageRect
        End Get
    End Property

    Protected Overrides ReadOnly Property TextRectangle() As Rectangle
        Get
            Return New Rectangle( _
                Me.Bounds.Left + 2, _
                 Me.ImageRectangle.Bottom, _
                Me.Bounds.Width - 4, _
                Me.Bounds.Height - Me.ImageRectangle.Height - 1)
        End Get
    End Property


    Protected Overrides Sub Initialize(ByVal activity As Activity)

        MyBase.Initialize(activity)
        Dim bmp As Bitmap = Resources.ToolboxImage
        bmp.MakeTransparent()
        Me.Image = bmp
    End Sub

    Shared ReadOnly BaseSize As New Size(64, 64)
    Protected Overrides Function OnLayoutSize(ByVal e As ActivityDesignerLayoutEventArgs) As Size
        Return BaseSize
    End Function

    Private expandedValue As Boolean = True
    Private useBasePaintValue As Boolean = False

    Public Property UseBasePaint() As Boolean
        Get
            Return Me.useBasePaintValue
        End Get

        Set(ByVal value As Boolean)
            Me.useBasePaintValue = value
        End Set
    End Property

    Public Property Expanded() As Boolean
        Get
            Return Me.expandedValue
        End Get
        Set(ByVal value As Boolean)
            Me.expandedValue = value
        End Set
    End Property


    Protected Overrides Sub OnPaint(ByVal e As ActivityDesignerPaintEventArgs)
        If Me.UseBasePaint = True Then
            MyBase.OnPaint(e)
            Return
        End If

        DrawCustomActivity(e)
    End Sub

    Private Sub DrawCustomActivity(ByVal e As ActivityDesignerPaintEventArgs)
        Dim graphics As Graphics = e.Graphics

        Dim compositeDesignerTheme As CompositeDesignerTheme = CType(e.DesignerTheme, CompositeDesignerTheme)

        ActivityDesignerPaint.DrawRoundedRectangle(graphics, compositeDesignerTheme.BorderPen, Me.Bounds, compositeDesignerTheme.BorderWidth)

        Dim text As String = Me.Text
        Dim TextRectangle As Rectangle = Me.TextRectangle
        If Not String.IsNullOrEmpty(text) And Not TextRectangle.IsEmpty Then
            ActivityDesignerPaint.DrawText(graphics, compositeDesignerTheme.Font, text, TextRectangle, StringAlignment.Center, e.AmbientTheme.TextQuality, compositeDesignerTheme.ForegroundBrush)
        End If

        Dim Image As System.Drawing.Image = Me.Image
        Dim ImageRectangle As Rectangle = Me.ImageRectangle
        If Image IsNot Nothing And Not ImageRectangle.IsEmpty Then
            ActivityDesignerPaint.DrawImage(graphics, Image, ImageRectangle, DesignerContentAlignment.Fill)
        End If

        ActivityDesignerPaint.DrawExpandButton(graphics, _
            New Rectangle(Me.Location.X, Me.Location.Y, 10, 10), _
            Me.Expanded, _
            compositeDesignerTheme)
    End Sub
End Class

備註

注意

此資料討論已被汰換的類型及命名空間。This material discusses types and namespaces that are obsolete. 如需詳細資訊,請參閱 Windows Workflow Foundation 4.5 中即將淘汰的類型For more information, see Deprecated Types in Windows Workflow Foundation 4.5.

所有的活動設計工具元件會衍生自 ActivityDesignerAll activity designer components derive from ActivityDesigner. ActivityDesigner 提供了較簡單的設計工具,這個工具可讓使用者在設計模式中以視覺方式設計活動。The ActivityDesigner provides a simple designer which lets the user visually design activities in the design mode.

ActivityDesigner 為活動提供了簡易的機制,讓它們可以參與在設計介面上呈現工作流程。ActivityDesigner provides a simple mechanism for the activities so they can participate in rendering the workflow on the design surface.

ActivityDesigner 讓使用者可以自訂與活動相關聯的配置和繪製。ActivityDesigner lets the user customize layout and drawing associated with the activity.

ActivityDesigner 讓使用者可以延伸與活動相關聯的中繼資料。ActivityDesigner lets the user extend the metadata associated with the activity.

建構函式

ActivityDesigner() ActivityDesigner() ActivityDesigner() ActivityDesigner()

初始化 ActivityDesigner 類別的新執行個體。Initializes a new instance of the ActivityDesigner class.

屬性

AccessibilityObject AccessibilityObject AccessibilityObject AccessibilityObject

取得協助工具應用程式用來為殘障使用者調整應用程式 UI 的 AccessibleObjectGets an AccessibleObject that accessibility applications use to adjust the application UI for users who have impairments.

Activity Activity Activity Activity

取得與設計工具關聯的 ActivityGets the Activity associated with the designer.

Bounds Bounds Bounds Bounds

取得 Rectangle,其包含設計工具封入矩形的邏輯座標值。Gets a Rectangle which contains the value for the enclosing rectangle of the designer in logical coordinates.

DesignerActions DesignerActions DesignerActions DesignerActions

取得與組態錯誤相關聯的動作陣列。Gets the array of actions associated with configuration errors.

DesignerTheme DesignerTheme DesignerTheme DesignerTheme

取得活動設計工具目前的設計工具主題。Gets the current designer theme for the activity designer.

EnableVisualResizing EnableVisualResizing EnableVisualResizing EnableVisualResizing

取得值,這個值表示活動設計工具是否可以在不限格式的設計工具中調整大小。Gets a value that indicates whether the activity designer can be resized in a free form designer.

Glyphs Glyphs Glyphs Glyphs

取得圖像集合,透過它可以裝飾設計工具。Gets a collection of glyphs with which to adorn the designer.

Image Image Image Image

取得或設定與設計工具相關聯的 ImageGets or sets the Image associated with the designer.

ImageRectangle ImageRectangle ImageRectangle ImageRectangle

取得影像包圍界線的邏輯座標值,這個影像則與設計工具相關聯。Gets the value for the enclosing bounds of the image associated with the designer in logical coordinates.

InvokingDesigner InvokingDesigner InvokingDesigner InvokingDesigner

取得或設定活動設計工具,它會叫用與目前的活動設計工具關聯的活動。Gets or sets the designer of the activity that invokes the activity associated with the current activity designer.

IsLocked IsLocked IsLocked IsLocked

取得值,這個值表示與設計工具關聯的活動是否可以修改。Gets a value that indicates whether the activity associated with the designer can be modified.

IsPrimarySelection IsPrimarySelection IsPrimarySelection IsPrimarySelection

取得值,指出與設計工具相關聯的活動是否為主要選取範圍。Gets a value that indicates whether the activity associated with the designer is the primary selection.

IsRootDesigner IsRootDesigner IsRootDesigner IsRootDesigner

取得值,這個值表示設計工具是否為根目錄設計工具。Gets a value that indicates whether the designer is a root designer.

IsSelected IsSelected IsSelected IsSelected

取得值,指出是否已選取與設計工具相關聯的活動。Gets a value that indicates whether the activity associated with the designer is selected.

IsVisible IsVisible IsVisible IsVisible

取得值,指出是否可以在工作流程中看見與設計工具相關聯的活動。Gets a value that indicates whether the activity associated with the designer is visible on the workflow.

Location Location Location Location

取得或設定設計工具的邏輯座標位置。Gets or sets the location of the designer in logical coordinates.

MessageFilters MessageFilters MessageFilters MessageFilters

取得與活動設計工具關聯的訊息篩選器唯讀集合。Gets a read-only collection of message filters that are associated with the activity designer.

MinimumSize MinimumSize MinimumSize MinimumSize

取得活動設計工具的最小大小。Gets the minimum size for the activity designer.

ParentDesigner ParentDesigner ParentDesigner ParentDesigner

取得現有設計工具的父設計工具。Gets the parent designer of the existing designer.

ParentView ParentView ParentView ParentView

取得包含目前活動設計工具的工作流程檢視。Gets the workflow view that contains the current activity designer.

ShowSmartTag ShowSmartTag ShowSmartTag ShowSmartTag

取得值,指出活動是否應顯示智慧標籤。Gets a value that indicates whether the activity should show a smart tag.

Size Size Size Size

取得或設定 ActivityDesigner 的大小。Gets or sets the size of the ActivityDesigner.

SmartTagRectangle SmartTagRectangle SmartTagRectangle SmartTagRectangle

取得應顯示智慧標籤的矩形。Gets the rectangle where the smart tag should be displayed.

SmartTagVerbs SmartTagVerbs SmartTagVerbs SmartTagVerbs

取得要與活動設計工具上智慧標籤產生關聯之設計工具動作的唯讀集合。Gets a read-only collection of designer actions to associate with a smart tag on the activity designer.

Text Text Text Text

取得或設定與設計工具相關聯的文字。Gets or sets the text to associate with the designer.

TextRectangle TextRectangle TextRectangle TextRectangle

取得文字矩形的邏輯座標值。Gets the value of the text rectangle in logical coordinates.

Verbs Verbs Verbs Verbs

取得要與設計工具產生關聯的動詞集合。Gets the collection of verbs to be associated with the designer.

方法

CanBeParentedTo(CompositeActivityDesigner) CanBeParentedTo(CompositeActivityDesigner) CanBeParentedTo(CompositeActivityDesigner) CanBeParentedTo(CompositeActivityDesigner)

傳回值,這個值表示 CompositeActivity 是否可以設定為與設計工具相關聯之活動的父系。Returns a value that indicates if a CompositeActivity can be set as the parent of the activity associated with the designer.

CanConnect(ConnectionPoint, ConnectionPoint) CanConnect(ConnectionPoint, ConnectionPoint) CanConnect(ConnectionPoint, ConnectionPoint) CanConnect(ConnectionPoint, ConnectionPoint)

傳回值,這個值表示是否能在目前活動設計工具的指定連線點和目標活動設計工具的指定連線點之間建立連線。Returns a value that indicates whether a connection can be created between the specified connection point on the current activity designer and the specified connection point on a target activity designer.

CreateView(ViewTechnology) CreateView(ViewTechnology) CreateView(ViewTechnology) CreateView(ViewTechnology)

使用指定的 ViewTechnology 為目前的活動設計工具建立工作流程檢視。Creates a workflow view for the current activity designer using the specified ViewTechnology.

Dispose() Dispose() Dispose() Dispose()

釋放 ActivityDesigner 所使用的 Unmanaged 資源,並選擇性地釋放 Managed 資源。Releases the unmanaged resources used by the ActivityDesigner and optionally releases the managed resources.

Dispose(Boolean) Dispose(Boolean) Dispose(Boolean) Dispose(Boolean)

釋放 ActivityDesigner 類別所使用的資源。Releases the resources used by the ActivityDesigner class.

DoDefaultAction() DoDefaultAction() DoDefaultAction() DoDefaultAction()

執行與設計工具關聯的預設 UI 動作。Performs the default UI action associated with the designer.

EnsureVisible() EnsureVisible() EnsureVisible() EnsureVisible()

移動螢幕的可見區域,以確定能夠看見指定的設計工具。Shifts the visible area of the screen to guarantee that the specified designer is visible.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(Inherited from Object)
Finalize() Finalize() Finalize() Finalize()

在衍生類別中覆寫時,可讓物件決定性地清除任何資源。When overridden in a derived class, allows an object to clean up any resources deterministically.

GetConnectionPoints(DesignerEdges) GetConnectionPoints(DesignerEdges) GetConnectionPoints(DesignerEdges) GetConnectionPoints(DesignerEdges)

傳回沿著指定的 DesignerEdges 的活動設計工具所屬連接點的唯讀集合。Returns a read-only collection of connection points for the activity designer along the specified DesignerEdges.

GetConnections(DesignerEdges) GetConnections(DesignerEdges) GetConnections(DesignerEdges) GetConnections(DesignerEdges)

傳回設計工具用來連線的點唯讀集合。Returns a read-only collection of points that the designer uses for connections.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(Inherited from Object)
GetPreviewImage(Graphics) GetPreviewImage(Graphics) GetPreviewImage(Graphics) GetPreviewImage(Graphics)

取得指定之 Graphics 上活動設計工具的影像。Gets the image of the activity designer on the specified Graphics.

GetRootDesigner(IServiceProvider) GetRootDesigner(IServiceProvider) GetRootDesigner(IServiceProvider) GetRootDesigner(IServiceProvider)

傳回與工作流程設計介面相關聯的設計工具。Returns the designer associated with the design surface of the workflow.

GetService(Type) GetService(Type) GetService(Type) GetService(Type)

嘗試從與設計工具關聯之活動的設計模式站台,擷取指定的服務類型。Tries to retrieve the specified type of service from the design mode site for the activity associated with the designer.

GetType() GetType() GetType() GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(Inherited from Object)
HitTest(Point) HitTest(Point) HitTest(Point) HitTest(Point)

取得畫面上指定點中 ActivityDesigner 的相關資訊。Gets information about the ActivityDesigner at a specified point on the screen.

Initialize(Activity) Initialize(Activity) Initialize(Activity) Initialize(Activity)

使用相關聯的 Activity 初始化設計工具。Initializes the designer with the associated Activity.

Invalidate() Invalidate() Invalidate() Invalidate()

使設計工具失效。Invalidates the designer.

Invalidate(Rectangle) Invalidate(Rectangle) Invalidate(Rectangle) Invalidate(Rectangle)

使設計工具的指定矩形無效。Invalidates the specified rectangle on the designer.

IsCommentedActivity(Activity) IsCommentedActivity(Activity) IsCommentedActivity(Activity) IsCommentedActivity(Activity)

傳回值,這個值指示目前設計工具的活動是否已加上註解或在已加上註解的活動內。Returns a value that indicates whether the current designer's activity is commented or is inside a commented activity.

IsSupportedActivityType(Type) IsSupportedActivityType(Type) IsSupportedActivityType(Type) IsSupportedActivityType(Type)

傳回值,這個值表示如果活動設計工具為根目錄設計工具時是否支援指定的活動類型。Returns a value that indicates whether the specified activity type is supported if the activity designer is a root designer.

LoadViewState(BinaryReader) LoadViewState(BinaryReader) LoadViewState(BinaryReader) LoadViewState(BinaryReader)

從二進位資料流載入設計工具的檢視狀態。Loads the view state of the designer from a binary stream.

MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

建立目前 Object 的淺層複本 (Shallow Copy)。Creates a shallow copy of the current Object.

(Inherited from Object)
OnActivityChanged(ActivityChangedEventArgs) OnActivityChanged(ActivityChangedEventArgs) OnActivityChanged(ActivityChangedEventArgs) OnActivityChanged(ActivityChangedEventArgs)

當活動與變更關聯時,通知 ActivityDesignerNotifies the ActivityDesigner when the activity it is associated with changes.

OnBeginResizing(ActivityDesignerResizeEventArgs) OnBeginResizing(ActivityDesignerResizeEventArgs) OnBeginResizing(ActivityDesignerResizeEventArgs) OnBeginResizing(ActivityDesignerResizeEventArgs)

當設計工具為 ActivityDesigner,而使用者開始以視覺方法調整活動設計工具的大小時,通知 FreeformActivityDesignerNotifies the ActivityDesigner when a user starts to visually resize the activity designer when the designer is in a FreeformActivityDesigner.

OnConnected(ConnectionPoint, ConnectionPoint) OnConnected(ConnectionPoint, ConnectionPoint) OnConnected(ConnectionPoint, ConnectionPoint) OnConnected(ConnectionPoint, ConnectionPoint)

當在兩個連線點之間建立連線時,通知 ActivityDesignerNotifies the ActivityDesigner when a connection is established between two connection points.

OnDragDrop(ActivityDragEventArgs) OnDragDrop(ActivityDragEventArgs) OnDragDrop(ActivityDragEventArgs) OnDragDrop(ActivityDragEventArgs)

當在設計工具界限內完成拖放作業時發生。Occurs when the drag-drop operation is completed inside designer bounds.

OnDragEnter(ActivityDragEventArgs) OnDragEnter(ActivityDragEventArgs) OnDragEnter(ActivityDragEventArgs) OnDragEnter(ActivityDragEventArgs)

當正在進行拖放作業且指標進入設計工具界限內時發生。Occurs when the drag-drop operation is in progress and the pointer enters the designer bounds.

OnDragLeave() OnDragLeave() OnDragLeave() OnDragLeave()

當正在進行拖放作業且指標離開設計工具界限時發生。Occurs when the drag-drop operation is in progress and the pointer leaves the designer bounds.

OnDragOver(ActivityDragEventArgs) OnDragOver(ActivityDragEventArgs) OnDragOver(ActivityDragEventArgs) OnDragOver(ActivityDragEventArgs)

當正在進行拖放作業且指標位於設計工具界限內時發生。Occurs when the drag-drop operation is in progress and the pointer is within the designer bounds.

OnEndResizing() OnEndResizing() OnEndResizing() OnEndResizing()

當設計工具為 ActivityDesigner,而使用者完成以視覺方法調整活動設計工具的大小時,通知 FreeformActivityDesignerNotifies the ActivityDesigner when a user is finished visually resizing the activity designer when the designer is in a FreeformActivityDesigner.

OnExecuteDesignerAction(DesignerAction) OnExecuteDesignerAction(DesignerAction) OnExecuteDesignerAction(DesignerAction) OnExecuteDesignerAction(DesignerAction)

當使用者按一下與設計工具相關聯的組態錯誤時,通知 ActivityDesignerNotifies the ActivityDesigner when the user clicks on the configuration errors associated with the designer.

OnGiveFeedback(GiveFeedbackEventArgs) OnGiveFeedback(GiveFeedbackEventArgs) OnGiveFeedback(GiveFeedbackEventArgs) OnGiveFeedback(GiveFeedbackEventArgs)

更新當執行拖曳作業時提供給使用者的回應視覺提示。Updates the visual cues for feedback supplied to the user when performing a drag operation.

OnKeyDown(KeyEventArgs) OnKeyDown(KeyEventArgs) OnKeyDown(KeyEventArgs) OnKeyDown(KeyEventArgs)

發生於設計工具擁有鍵盤焦點,且按下按鍵時。Occurs when a key is pressed when the designer has the keyboard focus.

OnKeyUp(KeyEventArgs) OnKeyUp(KeyEventArgs) OnKeyUp(KeyEventArgs) OnKeyUp(KeyEventArgs)

發生於設計工具擁有鍵盤焦點,且釋放按鍵時。Occurs when a key is released when the designer has keyboard focus.

OnLayoutPosition(ActivityDesignerLayoutEventArgs) OnLayoutPosition(ActivityDesignerLayoutEventArgs) OnLayoutPosition(ActivityDesignerLayoutEventArgs) OnLayoutPosition(ActivityDesignerLayoutEventArgs)

當使用者重新調整其視覺提示或子活動設計工具的位置時,通知 ActivityDesignerNotifies the ActivityDesigner when a user repositions its visual cues or child activity designers.

OnLayoutSize(ActivityDesignerLayoutEventArgs) OnLayoutSize(ActivityDesignerLayoutEventArgs) OnLayoutSize(ActivityDesignerLayoutEventArgs) OnLayoutSize(ActivityDesignerLayoutEventArgs)

傳回 ActivityDesigner 上的視覺提示或子活動設計工具的大小。Returns the size of the visual cues or child activity designers on the ActivityDesigner.

OnMouseCaptureChanged() OnMouseCaptureChanged() OnMouseCaptureChanged() OnMouseCaptureChanged()

當滑鼠捕捉變更時出現。Occurs when the mouse capture changes.

OnMouseDoubleClick(MouseEventArgs) OnMouseDoubleClick(MouseEventArgs) OnMouseDoubleClick(MouseEventArgs) OnMouseDoubleClick(MouseEventArgs)

發生於當在設計工具上按下滑鼠按鈕多次時。Occurs when the mouse button is clicked multiple times on the designer.

OnMouseDown(MouseEventArgs) OnMouseDown(MouseEventArgs) OnMouseDown(MouseEventArgs) OnMouseDown(MouseEventArgs)

發生於在指標位於設計工具界限上時按下滑鼠按鈕時。Occurs when the mouse button is pressed when the pointer is in designer bounds.

OnMouseDragBegin(Point, MouseEventArgs) OnMouseDragBegin(Point, MouseEventArgs) OnMouseDragBegin(Point, MouseEventArgs) OnMouseDragBegin(Point, MouseEventArgs)

發生於當使用者開始在設計工具上拖曳滑鼠時。Occurs when the user starts to drag the mouse on the designer.

OnMouseDragEnd() OnMouseDragEnd() OnMouseDragEnd() OnMouseDragEnd()

發生於當使用者停止在設計工具上拖曳滑鼠時。Occurs when the user stops dragging the mouse on the designer.

OnMouseDragMove(MouseEventArgs) OnMouseDragMove(MouseEventArgs) OnMouseDragMove(MouseEventArgs) OnMouseDragMove(MouseEventArgs)

的任何滑鼠移動。Occurs on each movement of the mouse as the user drags the pointer over the designer.

OnMouseEnter(MouseEventArgs) OnMouseEnter(MouseEventArgs) OnMouseEnter(MouseEventArgs) OnMouseEnter(MouseEventArgs)

發生於當滑鼠初次進入設計工具界限時。Occurs when the mouse first enters the designer bounds.

OnMouseHover(MouseEventArgs) OnMouseHover(MouseEventArgs) OnMouseHover(MouseEventArgs) OnMouseHover(MouseEventArgs)

發生於當指標位於設計工具界限內時。Occurs when the pointer is in designer bounds.

OnMouseLeave() OnMouseLeave() OnMouseLeave() OnMouseLeave()

發生於當指標離開設計工具界限時。Occurs when the pointer leaves designer bounds.

OnMouseMove(MouseEventArgs) OnMouseMove(MouseEventArgs) OnMouseMove(MouseEventArgs) OnMouseMove(MouseEventArgs)

發生於當指標在設計工具界限內移動時。Occurs when the pointer is moving in designer bounds.

OnMouseUp(MouseEventArgs) OnMouseUp(MouseEventArgs) OnMouseUp(MouseEventArgs) OnMouseUp(MouseEventArgs)

發生於在指標位於設計工具界限上時釋放滑鼠按鈕時。Occurs when the mouse button is released when the pointer is in designer bounds.

OnPaint(ActivityDesignerPaintEventArgs) OnPaint(ActivityDesignerPaintEventArgs) OnPaint(ActivityDesignerPaintEventArgs) OnPaint(ActivityDesignerPaintEventArgs)

在設計階段繪製活動的視覺化表示。Draws the visual representation of the activity at design time.

OnProcessMessage(Message) OnProcessMessage(Message) OnProcessMessage(Message) OnProcessMessage(Message)

允許設計工具處理原始的 Win32 訊息。Allows the designer to process raw Win32 messages.

OnQueryContinueDrag(QueryContinueDragEventArgs) OnQueryContinueDrag(QueryContinueDragEventArgs) OnQueryContinueDrag(QueryContinueDragEventArgs) OnQueryContinueDrag(QueryContinueDragEventArgs)

控制是否該繼續拖曳作業。Controls whether the drag operation should continue.

OnResizing(ActivityDesignerResizeEventArgs) OnResizing(ActivityDesignerResizeEventArgs) OnResizing(ActivityDesignerResizeEventArgs) OnResizing(ActivityDesignerResizeEventArgs)

當使用者在設計階段以視覺方式重新調整大小時,通知 ActivityDesignerNotifies the ActivityDesigner when a user is visually resizing it at design time. 只有在活動設計工具為子 FreeformActivityDesigner 時,才會呼叫這個方法The method is only called if the activity designer is a child of a FreeformActivityDesigner.

OnScroll(ScrollBar, Int32) OnScroll(ScrollBar, Int32) OnScroll(ScrollBar, Int32) OnScroll(ScrollBar, Int32)

當使用者變更捲軸的位置時,通知 ActivityDesignerNotifies the ActivityDesigner when a user changes the scroll position.

OnShowSmartTagVerbs(Point) OnShowSmartTagVerbs(Point) OnShowSmartTagVerbs(Point) OnShowSmartTagVerbs(Point)

顯示與指定點上智慧標籤相關聯的設計工具動詞。Displays the designer verbs associated with a smart tag at the specified point.

OnSmartTagVisibilityChanged(Boolean) OnSmartTagVisibilityChanged(Boolean) OnSmartTagVisibilityChanged(Boolean) OnSmartTagVisibilityChanged(Boolean)

當顯示或隱藏智慧標籤時,通知 ActivityDesignerNotifies the ActivityDesigner whether a smart tag should be displayed or hidden.

OnThemeChange(ActivityDesignerTheme) OnThemeChange(ActivityDesignerTheme) OnThemeChange(ActivityDesignerTheme) OnThemeChange(ActivityDesignerTheme)

通知設計工具相關的主題已改變。Notifies the designer that the associated theme has changed.

PerformLayout() PerformLayout() PerformLayout() PerformLayout()

更新設計工具的配置。Updates the layout of the designer.

PointToLogical(Point) PointToLogical(Point) PointToLogical(Point) PointToLogical(Point)

將點從螢幕座標系統轉換至活動設計工具座標系統。Transforms a point from screen coordinate system to the activity designer coordinate system.

PointToScreen(Point) PointToScreen(Point) PointToScreen(Point) PointToScreen(Point)

將點從活動設計工具座標系統轉換至螢幕座標系統。Transforms a point from the activity designer coordinate system to the screen coordinate system.

PostFilterAttributes(IDictionary) PostFilterAttributes(IDictionary) PostFilterAttributes(IDictionary) PostFilterAttributes(IDictionary)

在衍生類別中覆寫時,允許設計工具可以變更或移除透過 TypeDescriptor 所公開之屬性集中的項目。When overridden in a derived class, allows a designer to change or remove items from the set of attributes that it exposes through a TypeDescriptor.

PostFilterEvents(IDictionary) PostFilterEvents(IDictionary) PostFilterEvents(IDictionary) PostFilterEvents(IDictionary)

在衍生類別中覆寫時,允許設計工具可以變更或移除透過 TypeDescriptor 所公開之屬性集中的項目。When overridden in a derived class, allows the designer to change or remove items from the set of events that it exposes through a TypeDescriptor.

PostFilterProperties(IDictionary) PostFilterProperties(IDictionary) PostFilterProperties(IDictionary) PostFilterProperties(IDictionary)

在衍生類別中覆寫時,允許設計工具可以變更或移除透過 TypeDescriptor 所公開之屬性集中的項目。When overridden in a derived class, allows a designer to change or remove items from the set of properties that it exposes through a TypeDescriptor.

PreFilterAttributes(IDictionary) PreFilterAttributes(IDictionary) PreFilterAttributes(IDictionary) PreFilterAttributes(IDictionary)

在衍生類別中覆寫時,可讓設計工具將項目加入至其透過 TypeDescriptor 所公開 (Expose) 的屬性集合。When overridden in a derived class, allows a designer to add items to the set of attributes that it exposes through a TypeDescriptor.

PreFilterEvents(IDictionary) PreFilterEvents(IDictionary) PreFilterEvents(IDictionary) PreFilterEvents(IDictionary)

在衍生類別中覆寫時,可讓設計工具將項目加入至其透過 TypeDescriptor 所公開的事件集合。When overridden in a derived class, allows a designer to add items to the set of events that it exposes through a TypeDescriptor.

PreFilterProperties(IDictionary) PreFilterProperties(IDictionary) PreFilterProperties(IDictionary) PreFilterProperties(IDictionary)

在衍生類別中覆寫時,可讓設計工具將項目加入至其透過 TypeDescriptor 所公開的屬性集合。When overridden in a derived class, allows a designer to add items to the set of properties that it exposes through a TypeDescriptor.

RectangleToLogical(Rectangle) RectangleToLogical(Rectangle) RectangleToLogical(Rectangle) RectangleToLogical(Rectangle)

將矩形從螢幕座標系統轉換至活動設計工具座標系統。Transforms a rectangle from the screen coordinate system to the activity designer coordinate system.

RectangleToScreen(Rectangle) RectangleToScreen(Rectangle) RectangleToScreen(Rectangle) RectangleToScreen(Rectangle)

將矩形從活動設計工具座標系統轉換至螢幕座標系統。Transforms a rectangle from the activity designer coordinate system to the screen coordinate system.

RefreshDesignerActions() RefreshDesignerActions() RefreshDesignerActions() RefreshDesignerActions()

重新整理與設計工具相關聯的組態錯誤。Refreshes the configuration errors associated with the designer.

RefreshDesignerVerbs() RefreshDesignerVerbs() RefreshDesignerVerbs() RefreshDesignerVerbs()

呼叫狀態處理常式可重新整理與設計工具相關聯的活動設計工具動詞。Refreshes the activity designer verbs associated with the designer by calling the status handler.

SaveViewState(BinaryWriter) SaveViewState(BinaryWriter) SaveViewState(BinaryWriter) SaveViewState(BinaryWriter)

將設計工具的檢視狀態儲存到二進位資料流。Stores the view state of the designer into a binary stream.

ShowInfoTip(String) ShowInfoTip(String) ShowInfoTip(String) ShowInfoTip(String)

顯示指定的資訊提示。Shows the specified info tip.

ShowInfoTip(String, String) ShowInfoTip(String, String) ShowInfoTip(String, String) ShowInfoTip(String, String)

以指定的標題和文字顯示 ActivityDesigner 的資訊提示。Displays the info tip for the ActivityDesigner with the specified title and text.

ShowInPlaceTip(String, Rectangle) ShowInPlaceTip(String, Rectangle) ShowInPlaceTip(String, Rectangle) ShowInPlaceTip(String, Rectangle)

在定的矩形位置中顯示指定的工具提示。Displays the specified tool tip in the specified rectangle location.

ToString() ToString() ToString() ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(Inherited from Object)

明確介面實作

IDesigner.Component IDesigner.Component IDesigner.Component IDesigner.Component

取得與活動設計工具相關聯的基底元件。Gets the base component with which the activity designer is associated.

IDesigner.DoDefaultAction() IDesigner.DoDefaultAction() IDesigner.DoDefaultAction() IDesigner.DoDefaultAction()

執行與設計工具相關聯的預設動作。Performs the default action associated with the designer.

IDesigner.Initialize(IComponent) IDesigner.Initialize(IComponent) IDesigner.Initialize(IComponent) IDesigner.Initialize(IComponent)

使用關聯的活動初始化設計工具。Initializes the designer with the associated activity.

IDesigner.Verbs IDesigner.Verbs IDesigner.Verbs IDesigner.Verbs

傳回與活動設計工具相關聯的設計階段動詞。Gets the design-time verbs associated with the activity designer.

IDesignerFilter.PostFilterAttributes(IDictionary) IDesignerFilter.PostFilterAttributes(IDictionary) IDesignerFilter.PostFilterAttributes(IDictionary) IDesignerFilter.PostFilterAttributes(IDictionary)

在衍生類別中覆寫時,允許設計工具可以變更或移除透過 TypeDescriptor 所公開之屬性集中的項目。When overridden in a derived class, allows a designer to change or remove items from the set of attributes that it exposes through a TypeDescriptor.

IDesignerFilter.PostFilterEvents(IDictionary) IDesignerFilter.PostFilterEvents(IDictionary) IDesignerFilter.PostFilterEvents(IDictionary) IDesignerFilter.PostFilterEvents(IDictionary)

在衍生類別中覆寫時,允許設計工具可以變更或移除透過 TypeDescriptor 所公開之屬性集中的項目。When overridden in a derived class, allows a designer to change or remove items from the set of events that it exposes through a TypeDescriptor.

IDesignerFilter.PostFilterProperties(IDictionary) IDesignerFilter.PostFilterProperties(IDictionary) IDesignerFilter.PostFilterProperties(IDictionary) IDesignerFilter.PostFilterProperties(IDictionary)

在衍生類別中覆寫時,允許設計工具可以變更或移除透過 TypeDescriptor 所公開之屬性集中的項目。When overridden in a derived class, allows a designer to change or remove items from the set of properties that it exposes through a TypeDescriptor.

IDesignerFilter.PreFilterAttributes(IDictionary) IDesignerFilter.PreFilterAttributes(IDictionary) IDesignerFilter.PreFilterAttributes(IDictionary) IDesignerFilter.PreFilterAttributes(IDictionary)

在衍生類別中覆寫時,可讓設計工具將項目加入至其透過 TypeDescriptor 所公開 (Expose) 的屬性集合。When overridden in a derived class, allows a designer to add items to the set of attributes that it exposes through a TypeDescriptor.

IDesignerFilter.PreFilterEvents(IDictionary) IDesignerFilter.PreFilterEvents(IDictionary) IDesignerFilter.PreFilterEvents(IDictionary) IDesignerFilter.PreFilterEvents(IDictionary)

在衍生類別中覆寫時,可讓設計工具將項目加入至其透過 TypeDescriptor 所公開的事件集合。When overridden in a derived class, allows a designer to add items to the set of events that it exposes through a TypeDescriptor.

IDesignerFilter.PreFilterProperties(IDictionary) IDesignerFilter.PreFilterProperties(IDictionary) IDesignerFilter.PreFilterProperties(IDictionary) IDesignerFilter.PreFilterProperties(IDictionary)

在衍生類別中覆寫時,可讓設計工具將項目加入至其透過 TypeDescriptor 所公開的屬性集合。When overridden in a derived class, allows a designer to add items to the set of properties that it exposes through a TypeDescriptor.

IPersistUIState.LoadViewState(BinaryReader) IPersistUIState.LoadViewState(BinaryReader) IPersistUIState.LoadViewState(BinaryReader) IPersistUIState.LoadViewState(BinaryReader)

從二進位資料流還原檢視狀態。Restores the view state from a binary stream.

IPersistUIState.SaveViewState(BinaryWriter) IPersistUIState.SaveViewState(BinaryWriter) IPersistUIState.SaveViewState(BinaryWriter) IPersistUIState.SaveViewState(BinaryWriter)

將檢視狀態儲存到二進位資料流。Saves the view state to a binary stream.

IRootDesigner.GetView(ViewTechnology) IRootDesigner.GetView(ViewTechnology) IRootDesigner.GetView(ViewTechnology) IRootDesigner.GetView(ViewTechnology)

傳回指定之檢視技術的檢視物件。Returns a view object for the specified view technology.

IRootDesigner.SupportedTechnologies IRootDesigner.SupportedTechnologies IRootDesigner.SupportedTechnologies IRootDesigner.SupportedTechnologies

取得技術的陣列,該活動設計工具可支援其顯示。Gets the array of technologies that the activity designer can support for its display.

IToolboxUser.GetToolSupported(ToolboxItem) IToolboxUser.GetToolSupported(ToolboxItem) IToolboxUser.GetToolSupported(ToolboxItem) IToolboxUser.GetToolSupported(ToolboxItem)

判斷目前的活動設計工具是否支援指定的工具箱項目。Determines whether the specified Toolbox item is supported by the current activity designer.

IToolboxUser.ToolPicked(ToolboxItem) IToolboxUser.ToolPicked(ToolboxItem) IToolboxUser.ToolPicked(ToolboxItem) IToolboxUser.ToolPicked(ToolboxItem)

選取指定的工具列項目。Selects the specified toolbox item.

IWorkflowRootDesigner.InvokingDesigner IWorkflowRootDesigner.InvokingDesigner IWorkflowRootDesigner.InvokingDesigner IWorkflowRootDesigner.InvokingDesigner

取得或設定 CompositeActivityDesigner,它會要求初始化活動設計工具。Gets or sets the CompositeActivityDesigner that requested the activity designer be initialized.

IWorkflowRootDesigner.IsSupportedActivityType(Type) IWorkflowRootDesigner.IsSupportedActivityType(Type) IWorkflowRootDesigner.IsSupportedActivityType(Type) IWorkflowRootDesigner.IsSupportedActivityType(Type)

傳回值,這個值表示目前的 ActivityDesigner 是否支援指定型別。Returns a value that indicates whether the specified type is supported on the current ActivityDesigner.

IWorkflowRootDesigner.MessageFilters IWorkflowRootDesigner.MessageFilters IWorkflowRootDesigner.MessageFilters IWorkflowRootDesigner.MessageFilters

取得與活動設計工具相關聯的任何訊息篩選器。Gets any message filters associated with the activity designer.

IWorkflowRootDesigner.SupportsLayoutPersistence IWorkflowRootDesigner.SupportsLayoutPersistence IWorkflowRootDesigner.SupportsLayoutPersistence IWorkflowRootDesigner.SupportsLayoutPersistence

取得值,這個值會指出實際工作流程根目錄設計工具是否支援配置保存。Gets the value that indicates whether the actual workflow root designer supports the layout persistence.

適用於