IScrollInfo.CanVerticallyScroll 属性

定义

获取或设置一个值,该值指示是否可以在垂直轴上滚动。

public:
 property bool CanVerticallyScroll { bool get(); void set(bool value); };
public bool CanVerticallyScroll { get; set; }
member this.CanVerticallyScroll : bool with get, set
Public Property CanVerticallyScroll As Boolean

属性值

Boolean

如果可以滚动,则为 true;否则为 false。 此属性没有默认值。

示例

以下示例演示如何使用过程代码设置 CanVerticallyScroll 属性。

private void onLoad(object sender, System.EventArgs e)
{
    ((IScrollInfo)sp1).CanVerticallyScroll = true;
    ((IScrollInfo)sp1).CanHorizontallyScroll = true;
    ((IScrollInfo)sp1).ScrollOwner = sv1;
}
Private Sub onLoad(ByVal sender As Object, ByVal args As RoutedEventArgs)
    CType(sp1, IScrollInfo).CanVerticallyScroll = True
    CType(sp1, IScrollInfo).CanHorizontallyScroll = True
    CType(sp1, IScrollInfo).ScrollOwner = sv1
End Sub

适用于