共用方式為


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

適用於