共用方式為


IScrollInfo.CanHorizontallyScroll 屬性

定義

取得或設定值,指出是否可以在水平軸上捲動。

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

屬性值

Boolean

如果可以捲動,則為 true;否則為 false。 此屬性沒有預設值。

範例

下列範例示範如何使用程式碼來設定 CanHorizontallyScroll 屬性。

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

適用於