ScrollViewer.VerticalOffset 属性
定义
获取包含滚动内容的垂直偏移量的值。Gets a value that contains the vertical offset of the scrolled content.
public:
property double VerticalOffset { double get(); };
public double VerticalOffset { get; }
member this.VerticalOffset : double
Public ReadOnly Property VerticalOffset As Double
属性值
表示滚动内容的垂直偏移量的 Double。A Double that represents the vertical offset of the scrolled content. 默认值为 0.0。The default is 0.0.
注解
正值 VerticalOffset 对应于顶部偏移的内容。A positive VerticalOffset value corresponds to the content being offset to the top.
有效值介于零和之间 ScrollableHeight 。Valid values are between zero and ScrollableHeight.
如果 CanContentScroll 为 true
,则 ExtentHeight 、、和属性的值 ScrollableHeight ViewportHeight VerticalOffset 是项的数目。If CanContentScroll is true
, the values of the ExtentHeight, ScrollableHeight, ViewportHeight, and VerticalOffset properties are number of items. 如果 CanContentScroll 为 false
,则这些属性的值为与设备无关的像素。If CanContentScroll is false
, the values of these properties are Device Independent Pixels.
从 .NET Framework 版本 3.5 SP1 开始,如果 IsDeferredScrollingEnabled 为,则在 true
VerticalOffset 用户拖动时继续更改 Thumb ,但在发布之前,内容视图不会更改 Thumb 。Beginning in the .NET Framework version 3.5 SP1, when IsDeferredScrollingEnabled is true
, VerticalOffset continues to change as the user drags the Thumb, but the content view doesn't change until the Thumb is released. 在这种情况下, ContentVerticalOffset 表示可见内容偏移量,并 VerticalOffset 基于位置表示内容偏移量 Thumb 。In this case, ContentVerticalOffset represents the visible content offset and VerticalOffset represents the content offset based on the Thumb position.
依赖项属性信息Dependency Property Information
标识符字段Identifier field | VerticalOffsetProperty |
元数据属性设置为 true Metadata properties set to true |
无None |