WorkflowView.ScrollPosition 属性

定义

获取或设置滚动条在 WorkflowView 上的位置。

public:
 property System::Drawing::Point ScrollPosition { System::Drawing::Point get(); void set(System::Drawing::Point value); };
public System.Drawing.Point ScrollPosition { get; set; }
member this.ScrollPosition : System.Drawing.Point with get, set
Public Property ScrollPosition As Point

属性值

Point

描述屏幕坐标中滚动条位置的点。

示例

下面的示例演示如何设置 Panel 控件的 OnMouseMove 方法的实现内的 ScrollPosition 属性。 此示例摘自“Outlook 工作流向导”SDK 示例。 有关详细信息,请参阅Outlook工作流向导示例

protected override bool OnMouseMove(MouseEventArgs eventArgs)
{
    // Allow other components to process this event by not returning true.
    if (this.mouseDown)
    {
        this.workflowView.ScrollPosition = new Point(eventArgs.X, eventArgs.Y);
    }
    return false;
}
Protected Overrides Function OnMouseMove(ByVal eventArgs As System.Windows.Forms.MouseEventArgs) As Boolean
    ' Allow other components to process this event by not returning true.
    If (Me.mouseDown) Then
        Me.workflowView.ScrollPosition = New Point(eventArgs.X, eventArgs.Y)
    End If
    Return False
End Function

注解

使用 ScrollPosition 可以获取或调节设计图面中滚动条的位置。

适用于