Skip to content

Commit 56185ed

Browse files
committed
Rename to IsScrollAnimationEnabled
1 parent 5ac963f commit 56185ed

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

source/iNKORE.UI.WPF.Modern/Controls/ScrollViewerEx.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -117,19 +117,19 @@ public double WheelSensitivity
117117

118118
#endregion
119119

120-
#region EnableScrollAnimation
120+
#region IsScrollAnimationEnabled
121121

122-
public static readonly DependencyProperty EnableScrollAnimationProperty =
122+
public static readonly DependencyProperty IsScrollAnimationEnabledProperty =
123123
DependencyProperty.Register(
124-
nameof(EnableScrollAnimation),
124+
nameof(IsScrollAnimationEnabled),
125125
typeof(bool),
126126
typeof(ScrollViewerEx),
127127
new PropertyMetadata(true));
128128

129-
public bool EnableScrollAnimation
129+
public bool IsScrollAnimationEnabled
130130
{
131-
get => (bool)GetValue(EnableScrollAnimationProperty);
132-
set => SetValue(EnableScrollAnimationProperty, value);
131+
get => (bool)GetValue(IsScrollAnimationEnabledProperty);
132+
set => SetValue(IsScrollAnimationEnabledProperty, value);
133133
}
134134

135135
#endregion
@@ -196,7 +196,7 @@ protected override void OnMouseWheel(MouseWheelEventArgs e)
196196

197197
ScrollToVerticalOffset(LastVerticalLocation);
198198

199-
if (EnableScrollAnimation)
199+
if (IsScrollAnimationEnabled)
200200
{
201201
double scale = Math.Abs((LastVerticalLocation - newOffset) / WheelChange);
202202

@@ -239,7 +239,7 @@ protected override void OnMouseWheel(MouseWheelEventArgs e)
239239

240240
ScrollToHorizontalOffset(LastHorizontalLocation);
241241

242-
if (EnableScrollAnimation)
242+
if (IsScrollAnimationEnabled)
243243
{
244244
double scale = Math.Abs((LastHorizontalLocation - newOffset) / WheelChange);
245245

@@ -318,7 +318,7 @@ public bool ChangeView(double? horizontalOffset, double? verticalOffset, float?
318318
if (horizontalOffset.HasValue)
319319
{
320320
ScrollToHorizontalOffset(LastHorizontalLocation);
321-
if (EnableScrollAnimation)
321+
if (IsScrollAnimationEnabled)
322322
{
323323
AnimateScroll(Math.Min(ScrollableWidth, horizontalOffset.Value), Orientation.Horizontal, 1);
324324
}
@@ -332,7 +332,7 @@ public bool ChangeView(double? horizontalOffset, double? verticalOffset, float?
332332
if (verticalOffset.HasValue)
333333
{
334334
ScrollToVerticalOffset(LastVerticalLocation);
335-
if (EnableScrollAnimation)
335+
if (IsScrollAnimationEnabled)
336336
{
337337
AnimateScroll(Math.Min(ScrollableHeight, verticalOffset.Value), Orientation.Vertical, 1);
338338
}

0 commit comments

Comments
 (0)