整理控件库

This commit is contained in:
GG Z
2025-05-05 17:04:06 +08:00
parent 74532b77be
commit 3eaad7566e
283 changed files with 2156 additions and 17846 deletions

View File

@@ -7,7 +7,7 @@ using System.Windows.Input;
namespace WPFluent.Controls;
/// <summary>
/// Custom <see cref="System.Windows.Controls.Primitives.ScrollBar"/> with events depending on actions taken by the
/// HCWhite <see cref="System.Windows.Controls.Primitives.ScrollBar"/> with events depending on actions taken by the
/// user.
/// </summary>
public class DynamicScrollBar : System.Windows.Controls.Primitives.ScrollBar
@@ -44,12 +44,12 @@ public class DynamicScrollBar : System.Windows.Controls.Primitives.ScrollBar
private static void OnIsInteractedChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
if(d is not DynamicScrollBar bar)
if (d is not DynamicScrollBar bar)
{
return;
}
if(bar._isInteracted == bar.IsInteracted)
if (bar._isInteracted == bar.IsInteracted)
{
return;
}
@@ -61,12 +61,12 @@ public class DynamicScrollBar : System.Windows.Controls.Primitives.ScrollBar
private static void OnIsScrollingChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
if(d is not DynamicScrollBar bar)
if (d is not DynamicScrollBar bar)
{
return;
}
if(bar._isScrolling == bar.IsScrolling)
if (bar._isScrolling == bar.IsScrolling)
{
return;
}
@@ -81,17 +81,17 @@ public class DynamicScrollBar : System.Windows.Controls.Primitives.ScrollBar
var currentEvent = _interactiveIdentifier.GetNext();
var shouldScroll = IsMouseOver || _isScrolling;
if(shouldScroll == _isInteracted)
if (shouldScroll == _isInteracted)
{
return;
}
if(!shouldScroll)
if (!shouldScroll)
{
await Task.Delay(Timeout);
}
if(!_interactiveIdentifier.IsEqual(currentEvent))
if (!_interactiveIdentifier.IsEqual(currentEvent))
{
return;
}
@@ -127,7 +127,7 @@ public class DynamicScrollBar : System.Windows.Controls.Primitives.ScrollBar
get => (bool)GetValue(IsInteractedProperty);
set
{
if((bool)GetValue(IsInteractedProperty) != value)
if ((bool)GetValue(IsInteractedProperty) != value)
{
SetValue(IsInteractedProperty, value);
}

View File

@@ -7,7 +7,7 @@ using System.Windows.Controls;
namespace WPFluent.Controls;
/// <summary>
/// Custom <see cref="ScrollViewer"/> with events depending on actions taken by the user.
/// HCWhite <see cref="ScrollViewer"/> with events depending on actions taken by the user.
/// </summary>
[DefaultEvent("ScrollChangedEvent")]
public class DynamicScrollViewer : PassiveScrollViewer