modified tabcontrol style

This commit is contained in:
NaBian committed 2019-05-10 21:55:31 +08:00
1 parent 41323afc74
commit 5b0f3d6e2f
4 files changed
+201 -177

No files matched your search

@@ -17,8 +17,6 @@ namespace HandyControl.Controls
private bool _isRunning;
private Storyboard _scrollingAnimation = new Storyboard();
/// <summary>
/// 滚动方向
/// </summary>
@@ -30,7 +28,7 @@ namespace HandyControl.Controls
/// </summary>
public Orientation Orientation
{
get => (Orientation)GetValue(OrientationProperty);
get => (Orientation) GetValue(OrientationProperty);
set => SetValue(OrientationProperty, value);
}
@@ -45,7 +43,7 @@ namespace HandyControl.Controls
/// </summary>
public bool CanMouseWheel
{
get => (bool)GetValue(CanMouseWheelProperty);
get => (bool) GetValue(CanMouseWheelProperty);
set => SetValue(CanMouseWheelProperty, value);
}
@@ -103,7 +101,7 @@ namespace HandyControl.Controls
}
internal void ScrollToVerticalOffsetInternal(double offset, double milliseconds = 500)
{
{
var animation = AnimationHelper.CreateAnimation(offset, milliseconds);
animation.EasingFunction = new CubicEase
{
@@ -117,10 +115,7 @@ namespace HandyControl.Controls
};
_isRunning = true;
_scrollingAnimation.Children.Add(animation);
BeginStoryboard(_scrollingAnimation);
//BeginAnimation(CurrentVerticalOffsetProperty, animation);
BeginAnimation(CurrentVerticalOffsetProperty, animation, HandoffBehavior.Compose);
}
internal void ScrollToHorizontalOffsetInternal(double offset, double milliseconds = 500)
@@ -165,7 +160,7 @@ namespace HandyControl.Controls
/// </summary>
public bool IsEnableInertia
{
get => (bool)GetValue(IsEnableInertiaProperty);
get => (bool) GetValue(IsEnableInertiaProperty);
set => SetValue(IsEnableInertiaProperty, value);
}
@@ -180,7 +175,7 @@ namespace HandyControl.Controls
/// </summary>
public bool IsPenetrating
{
get => (bool)GetValue(IsPenetratingProperty);
get => (bool) GetValue(IsPenetratingProperty);
set => SetValue(IsPenetratingProperty, value);
}
@@ -191,7 +186,7 @@ namespace HandyControl.Controls
public static bool GetIsPenetrating(DependencyObject element)
{
return (bool)element.GetValue(IsPenetratingProperty);
return (bool) element.GetValue(IsPenetratingProperty);
}
/// <summary>
@@ -214,7 +209,7 @@ namespace HandyControl.Controls
private double CurrentVerticalOffset
{
// ReSharper disable once UnusedMember.Local
get => (double)GetValue(CurrentVerticalOffsetProperty);
get => (double) GetValue(CurrentVerticalOffsetProperty);
set => SetValue(CurrentVerticalOffsetProperty, value);
}
@@ -237,7 +232,7 @@ namespace HandyControl.Controls
/// </summary>
public double CurrentHorizontalOffset
{
get => (double)GetValue(CurrentHorizontalOffsetProperty);
get => (double) GetValue(CurrentHorizontalOffsetProperty);
set => SetValue(CurrentHorizontalOffsetProperty, value);
}
}