diff --git a/src/Uno.Toolkit.UI/Controls/ZoomContentControl/ZoomContentControl.Properties.cs b/src/Uno.Toolkit.UI/Controls/ZoomContentControl/ZoomContentControl.Properties.cs index 2385d3740..830e5be49 100644 --- a/src/Uno.Toolkit.UI/Controls/ZoomContentControl/ZoomContentControl.Properties.cs +++ b/src/Uno.Toolkit.UI/Controls/ZoomContentControl/ZoomContentControl.Properties.cs @@ -144,24 +144,6 @@ public double VerticalOffset #endregion - #region DependencyProperty: VerticalScrollValue - - /// Identifies the VerticalScrollValue dependency property. - public static DependencyProperty VerticalScrollValueProperty { get; } = DependencyProperty.Register( - nameof(VerticalScrollValue), - typeof(double), - typeof(ZoomContentControl), - new PropertyMetadata(default(double))); - - /// Gets or sets the value of the vertical scrollbar. - public double VerticalScrollValue - { - get => (double)GetValue(VerticalScrollValueProperty); - set => SetValue(VerticalScrollValueProperty, value); - } - - #endregion - #region DependencyProperty: VerticalMaxScroll /// Identifies the VerticalMaxScroll dependency property. diff --git a/src/Uno.Toolkit.UI/Controls/ZoomContentControl/ZoomContentControl.cs b/src/Uno.Toolkit.UI/Controls/ZoomContentControl/ZoomContentControl.cs index ca1bc4469..3857e44ad 100644 --- a/src/Uno.Toolkit.UI/Controls/ZoomContentControl/ZoomContentControl.cs +++ b/src/Uno.Toolkit.UI/Controls/ZoomContentControl/ZoomContentControl.cs @@ -92,11 +92,11 @@ private async Task RaiseRenderedContentUpdated() RenderedContentUpdated?.Invoke(this, EventArgs.Empty); } - private void OnVerticalOffsetChanged() + private async void OnVerticalOffsetChanged() { UpdateContentBoundsVisibility(); UpdateScrollVisibility(); - UpdateVerticalScrollBarValue(); + await RaiseRenderedContentUpdated(); } private void OnHorizontalOffsetChanged() @@ -158,12 +158,6 @@ private bool CanMoveIn((bool Horizontal, bool Vertical) _movementDirection) private bool CanScrollLeft() => !ContentBoundsVisibility.HasFlag(BoundsVisibilityFlag.Left); private bool CanScrollRight() => !ContentBoundsVisibility.HasFlag(BoundsVisibilityFlag.Right); - private async void UpdateVerticalScrollBarValue() - { - VerticalScrollValue = VerticalOffset; - await RaiseRenderedContentUpdated(); - } - private async void UpdateHorizontalScrollBarValue() { HorizontalScrollValue = -1 * HorizontalOffset;