optimized performance

This commit is contained in:
NaBian committed 2020-06-28 22:39:27 +08:00
1 parent c407997a3c
commit 3162267795
65 files changed
+168 -168

No files matched your search

@@ -100,7 +100,7 @@ namespace HandyControl.Controls
public bool IsPlaying
{
get => (bool)GetValue(IsPlayingProperty);
set => SetValue(IsPlayingProperty, value);
set => SetValue(IsPlayingProperty, ValueBoxes.BooleanBox(value));
}
public static readonly DependencyProperty RepeatBehaviorProperty = DependencyProperty.Register(
@@ -86,7 +86,7 @@ namespace HandyControl.Controls
public bool ShowBadge
{
get => (bool) GetValue(ShowBadgeProperty);
set => SetValue(ShowBadgeProperty, value);
set => SetValue(ShowBadgeProperty, ValueBoxes.BooleanBox(value));
}
protected override Geometry GetLayoutClip(Size layoutSlotSize) => null;
@@ -30,7 +30,7 @@ namespace HandyControl.Controls
public bool IsRead
{
get => (bool) GetValue(IsReadProperty);
set => SetValue(IsReadProperty, value);
set => SetValue(IsReadProperty, ValueBoxes.BooleanBox(value));
}
public static void SetMaxWidth(DependencyObject element, double value)
@@ -109,7 +109,7 @@ namespace HandyControl.Controls
public bool IsOpen
{
get => (bool) GetValue(IsOpenProperty);
set => SetValue(IsOpenProperty, value);
set => SetValue(IsOpenProperty, ValueBoxes.BooleanBox(value));
}
public static readonly DependencyProperty MaskCanCloseProperty = DependencyProperty.Register(
@@ -118,7 +118,7 @@ namespace HandyControl.Controls
public bool MaskCanClose
{
get => (bool) GetValue(MaskCanCloseProperty);
set => SetValue(MaskCanCloseProperty, value);
set => SetValue(MaskCanCloseProperty, ValueBoxes.BooleanBox(value));
}
public static readonly DependencyProperty ShowMaskProperty = DependencyProperty.Register(
@@ -127,7 +127,7 @@ namespace HandyControl.Controls
public bool ShowMask
{
get => (bool) GetValue(ShowMaskProperty);
set => SetValue(ShowMaskProperty, value);
set => SetValue(ShowMaskProperty, ValueBoxes.BooleanBox(value));
}
public static readonly DependencyProperty DockProperty = DependencyProperty.Register(
@@ -60,7 +60,7 @@ namespace HandyControl.Controls
public bool Animated
{
get => (bool) GetValue(AnimatedProperty);
set => SetValue(AnimatedProperty, value);
set => SetValue(AnimatedProperty, ValueBoxes.BooleanBox(value));
}
public static readonly DependencyProperty AnimationTimeProperty = DependencyProperty.Register(
@@ -87,7 +87,7 @@ namespace HandyControl.Controls
public bool AutoHiding
{
get => (bool) GetValue(AutoHidingProperty);
set => SetValue(AutoHidingProperty, value);
set => SetValue(AutoHidingProperty, ValueBoxes.BooleanBox(value));
}
protected override void OnClick()
@@ -335,7 +335,7 @@ namespace HandyControl.Controls
public bool IsBlink
{
get => (bool)GetValue(IsBlinkProperty);
set => SetValue(IsBlinkProperty, value);
set => SetValue(IsBlinkProperty, ValueBoxes.BooleanBox(value));
}
private void DispatcherTimerBlinkTick(object sender, EventArgs e)
@@ -231,7 +231,7 @@ namespace HandyControl.Controls
public bool IsJumpEnabled
{
get => (bool) GetValue(IsJumpEnabledProperty);
set => SetValue(IsJumpEnabledProperty, value);
set => SetValue(IsJumpEnabledProperty, ValueBoxes.BooleanBox(value));
}
#endregion
@@ -145,7 +145,7 @@ namespace HandyControl.Controls
public bool IsOpen
{
get => (bool) GetValue(IsOpenProperty);
set => SetValue(IsOpenProperty, value);
set => SetValue(IsOpenProperty, ValueBoxes.BooleanBox(value));
}
public static Poptip Default => new Poptip();
@@ -44,7 +44,7 @@ namespace HandyControl.Controls
public bool CanMouseWheel
{
get => (bool) GetValue(CanMouseWheelProperty);
set => SetValue(CanMouseWheelProperty, value);
set => SetValue(CanMouseWheelProperty, ValueBoxes.BooleanBox(value));
}
protected override void OnMouseWheel(MouseWheelEventArgs e)
@@ -155,7 +155,7 @@ namespace HandyControl.Controls
public bool IsInertiaEnabled
{
get => (bool) GetValue(IsInertiaEnabledProperty);
set => SetValue(IsInertiaEnabledProperty, value);
set => SetValue(IsInertiaEnabledProperty, ValueBoxes.BooleanBox(value));
}
/// <summary>
@@ -170,7 +170,7 @@ namespace HandyControl.Controls
public bool IsPenetrating
{
get => (bool) GetValue(IsPenetratingProperty);
set => SetValue(IsPenetratingProperty, value);
set => SetValue(IsPenetratingProperty, ValueBoxes.BooleanBox(value));
}
public static void SetIsPenetrating(DependencyObject element, bool value) => element.SetValue(IsPenetratingProperty, ValueBoxes.BooleanBox(value));
@@ -77,7 +77,7 @@ namespace HandyControl.Controls
public bool AutoSizeEnabled
{
get => (bool) GetValue(AutoSizeEnabledProperty);
set => SetValue(AutoSizeEnabledProperty, value);
set => SetValue(AutoSizeEnabledProperty, ValueBoxes.BooleanBox(value));
}
public static readonly DependencyProperty MarkMarginProperty = DependencyProperty.Register(