Skip to content

Commit

Permalink
chore: removed VerticalScrollValue
Browse files Browse the repository at this point in the history
  • Loading branch information
vatsashah45 committed Oct 13, 2024
1 parent 94a3a0a commit fc2af3b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit fc2af3b

Please sign in to comment.