Automated dotnet-format update
This commit is contained in:
1 parent
ad4c2f68aa
commit
2af18c2d38
403 files changed
+1569
-1567
No files matched your search
@@ -42,7 +42,7 @@ namespace HandyControl.Controls
|
||||
/// </summary>
|
||||
public Geometry Data
|
||||
{
|
||||
get => (Geometry)GetValue(DataProperty);
|
||||
get => (Geometry) GetValue(DataProperty);
|
||||
set => SetValue(DataProperty, value);
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace HandyControl.Controls
|
||||
/// </summary>
|
||||
public double PathLength
|
||||
{
|
||||
get => (double)GetValue(PathLengthProperty);
|
||||
get => (double) GetValue(PathLengthProperty);
|
||||
set => SetValue(PathLengthProperty, value);
|
||||
}
|
||||
|
||||
@@ -75,15 +75,15 @@ namespace HandyControl.Controls
|
||||
/// </summary>
|
||||
public Duration Duration
|
||||
{
|
||||
get => (Duration)GetValue(DurationProperty);
|
||||
get => (Duration) GetValue(DurationProperty);
|
||||
set => SetValue(DurationProperty, value);
|
||||
}
|
||||
|
||||
public static readonly DependencyProperty IsPlayingProperty = DependencyProperty.Register(
|
||||
"IsPlaying", typeof(bool), typeof(AnimationPath), new FrameworkPropertyMetadata(ValueBoxes.TrueBox, (o, args) =>
|
||||
{
|
||||
var ctl = (AnimationPath)o;
|
||||
var v = (bool)args.NewValue;
|
||||
var ctl = (AnimationPath) o;
|
||||
var v = (bool) args.NewValue;
|
||||
if (v)
|
||||
{
|
||||
ctl.UpdatePath();
|
||||
@@ -99,7 +99,7 @@ namespace HandyControl.Controls
|
||||
/// </summary>
|
||||
public bool IsPlaying
|
||||
{
|
||||
get => (bool)GetValue(IsPlayingProperty);
|
||||
get => (bool) GetValue(IsPlayingProperty);
|
||||
set => SetValue(IsPlayingProperty, ValueBoxes.BooleanBox(value));
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ namespace HandyControl.Controls
|
||||
/// </summary>
|
||||
public RepeatBehavior RepeatBehavior
|
||||
{
|
||||
get => (RepeatBehavior)GetValue(RepeatBehaviorProperty);
|
||||
get => (RepeatBehavior) GetValue(RepeatBehaviorProperty);
|
||||
set => SetValue(RepeatBehaviorProperty, value);
|
||||
}
|
||||
|
||||
@@ -197,4 +197,4 @@ namespace HandyControl.Controls
|
||||
|
||||
private void Storyboard_Completed(object sender, EventArgs e) => RaiseEvent(new RoutedEventArgs(CompletedEvent));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -35,8 +35,8 @@ namespace HandyControl.Controls
|
||||
|
||||
private static void OnValueChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||
{
|
||||
var ctl = (Badge)d;
|
||||
var v = (int)e.NewValue;
|
||||
var ctl = (Badge) d;
|
||||
var v = (int) e.NewValue;
|
||||
ctl.Text = v <= ctl.Maximum ? v.ToString() : $"{ctl.Maximum}+";
|
||||
if (ctl.IsInitialized)
|
||||
{
|
||||
@@ -49,7 +49,7 @@ namespace HandyControl.Controls
|
||||
|
||||
public int Value
|
||||
{
|
||||
get => (int)GetValue(ValueProperty);
|
||||
get => (int) GetValue(ValueProperty);
|
||||
set => SetValue(ValueProperty, value);
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ namespace HandyControl.Controls
|
||||
|
||||
public BadgeStatus Status
|
||||
{
|
||||
get => (BadgeStatus)GetValue(StatusProperty);
|
||||
get => (BadgeStatus) GetValue(StatusProperty);
|
||||
set => SetValue(StatusProperty, value);
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ namespace HandyControl.Controls
|
||||
|
||||
public int Maximum
|
||||
{
|
||||
get => (int)GetValue(MaximumProperty);
|
||||
get => (int) GetValue(MaximumProperty);
|
||||
set => SetValue(MaximumProperty, value);
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ namespace HandyControl.Controls
|
||||
|
||||
public Thickness BadgeMargin
|
||||
{
|
||||
get => (Thickness)GetValue(BadgeMarginProperty);
|
||||
get => (Thickness) GetValue(BadgeMarginProperty);
|
||||
set => SetValue(BadgeMarginProperty, value);
|
||||
}
|
||||
|
||||
@@ -91,4 +91,4 @@ namespace HandyControl.Controls
|
||||
|
||||
protected override Geometry GetLayoutClip(Size layoutSlotSize) => null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -100,7 +100,7 @@ namespace HandyControl.Controls
|
||||
|
||||
public FrameworkElement Content
|
||||
{
|
||||
get => (FrameworkElement)GetValue(ContentProperty);
|
||||
get => (FrameworkElement) GetValue(ContentProperty);
|
||||
set => SetValue(ContentProperty, value);
|
||||
}
|
||||
|
||||
@@ -113,4 +113,4 @@ namespace HandyControl.Controls
|
||||
set => SetValue(ActualContentProperty, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -43,4 +43,4 @@ namespace HandyControl.Controls
|
||||
ReadAction?.Invoke(Content);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -29,7 +29,7 @@ namespace HandyControl.Controls
|
||||
|
||||
private static void OnClearPenCache(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||
{
|
||||
var border = (DashedBorder)d;
|
||||
var border = (DashedBorder) d;
|
||||
border.LeftPenCache = null;
|
||||
border.RightPenCache = null;
|
||||
border.TopPenCache = null;
|
||||
@@ -302,9 +302,9 @@ namespace HandyControl.Controls
|
||||
var dpiScaleY = DpiHelper.DeviceDpiY;
|
||||
|
||||
borderThickness = new Thickness(
|
||||
DpiHelper.RoundLayoutValue(borderThickness.Left, dpiScaleX),
|
||||
DpiHelper.RoundLayoutValue(borderThickness.Left, dpiScaleX),
|
||||
DpiHelper.RoundLayoutValue(borderThickness.Top, dpiScaleY),
|
||||
DpiHelper.RoundLayoutValue(borderThickness.Right, dpiScaleX),
|
||||
DpiHelper.RoundLayoutValue(borderThickness.Right, dpiScaleX),
|
||||
DpiHelper.RoundLayoutValue(borderThickness.Bottom, dpiScaleY));
|
||||
}
|
||||
|
||||
@@ -667,4 +667,4 @@ namespace HandyControl.Controls
|
||||
internal readonly double LeftBottom;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -79,4 +79,4 @@ namespace HandyControl.Controls
|
||||
set => SetValue(LineStrokeDashArrayProperty, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -60,7 +60,7 @@ namespace HandyControl.Controls
|
||||
private void Drawer_Unloaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Loaded -= Drawer_Loaded;
|
||||
|
||||
|
||||
if (_maskElement != null)
|
||||
{
|
||||
_maskElement.PreviewMouseLeftButtonDown -= MaskElement_PreviewMouseLeftButtonDown;
|
||||
@@ -73,7 +73,7 @@ namespace HandyControl.Controls
|
||||
}
|
||||
|
||||
private static void DataContextPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) =>
|
||||
((Drawer)d).OnDataContextPropertyChanged(e);
|
||||
((Drawer) d).OnDataContextPropertyChanged(e);
|
||||
|
||||
private void OnDataContextPropertyChanged(DependencyPropertyChangedEventArgs e) => UpdateDataContext(_animationControl, e.OldValue, e.NewValue);
|
||||
|
||||
@@ -103,7 +103,7 @@ namespace HandyControl.Controls
|
||||
private static void OnIsOpenChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||
{
|
||||
var ctl = (Drawer) d;
|
||||
ctl.OnIsOpenChanged((bool)e.NewValue);
|
||||
ctl.OnIsOpenChanged((bool) e.NewValue);
|
||||
}
|
||||
|
||||
public bool IsOpen
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace HandyControl.Controls
|
||||
|
||||
public DependencyObject Target
|
||||
{
|
||||
get => (DependencyObject)GetValue(TargetProperty);
|
||||
get => (DependencyObject) GetValue(TargetProperty);
|
||||
set => SetValue(TargetProperty, value);
|
||||
}
|
||||
|
||||
@@ -97,4 +97,4 @@ namespace HandyControl.Controls
|
||||
_gotoTopAction?.Invoke();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -23,7 +23,7 @@ namespace HandyControl.Controls
|
||||
{
|
||||
var ctl = (Gravatar) d;
|
||||
if (ctl.Source != null) return;
|
||||
ctl.Content = ctl.Generator.GetGravatar((string)e.NewValue);
|
||||
ctl.Content = ctl.Generator.GetGravatar((string) e.NewValue);
|
||||
}
|
||||
|
||||
public string Id
|
||||
@@ -37,7 +37,7 @@ namespace HandyControl.Controls
|
||||
|
||||
private static void OnSourceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||
{
|
||||
var ctl = (Gravatar)d;
|
||||
var ctl = (Gravatar) d;
|
||||
var v = (ImageSource) e.NewValue;
|
||||
|
||||
ctl.Background = v != null
|
||||
@@ -54,4 +54,4 @@ namespace HandyControl.Controls
|
||||
set => SetValue(SourceProperty, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -45,11 +45,11 @@ namespace HandyControl.Controls
|
||||
public static readonly DependencyProperty ScaleProperty = DependencyProperty.Register(
|
||||
"Scale", typeof(double), typeof(Magnifier), new PropertyMetadata(5.0, OnScaleChanged), ValidateHelper.IsInRangeOfPosDouble);
|
||||
|
||||
private static void OnScaleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) => ((Magnifier)d).UpdateViewboxSize();
|
||||
private static void OnScaleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) => ((Magnifier) d).UpdateViewboxSize();
|
||||
|
||||
public double Scale
|
||||
{
|
||||
get => (double)GetValue(ScaleProperty);
|
||||
get => (double) GetValue(ScaleProperty);
|
||||
set => SetValue(ScaleProperty, value);
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ namespace HandyControl.Controls
|
||||
|
||||
private void UpdateViewboxSize() => _viewboxSize = new Size(ActualWidth / Scale, ActualHeight / Scale);
|
||||
|
||||
protected sealed override void OnTargetChanged(FrameworkElement element , bool isNew)
|
||||
protected sealed override void OnTargetChanged(FrameworkElement element, bool isNew)
|
||||
{
|
||||
base.OnTargetChanged(element, isNew);
|
||||
|
||||
@@ -129,7 +129,7 @@ namespace HandyControl.Controls
|
||||
{
|
||||
layer.Remove(_adornerContainer);
|
||||
}
|
||||
else if(_adornerContainer != null && _adornerContainer.Parent is AdornerLayer parent)
|
||||
else if (_adornerContainer != null && _adornerContainer.Parent is AdornerLayer parent)
|
||||
{
|
||||
parent.Remove(_adornerContainer);
|
||||
}
|
||||
|
||||
@@ -151,4 +151,4 @@ namespace HandyControl.Controls
|
||||
_timerClose.Start();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -69,8 +69,8 @@ namespace HandyControl.Controls
|
||||
|
||||
private static void OnVisibilityChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||
{
|
||||
var ctl = (NotifyIcon)d;
|
||||
var v = (Visibility)e.NewValue;
|
||||
var ctl = (NotifyIcon) d;
|
||||
var v = (Visibility) e.NewValue;
|
||||
|
||||
if (v == Visibility.Visible)
|
||||
{
|
||||
@@ -97,7 +97,7 @@ namespace HandyControl.Controls
|
||||
|
||||
private static void ContextMenuPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||
{
|
||||
var ctl = (NotifyIcon)d;
|
||||
var ctl = (NotifyIcon) d;
|
||||
ctl.OnContextMenuPropertyChanged(e);
|
||||
}
|
||||
|
||||
@@ -249,7 +249,7 @@ namespace HandyControl.Controls
|
||||
|
||||
public string Token
|
||||
{
|
||||
get => (string)GetValue(TokenProperty);
|
||||
get => (string) GetValue(TokenProperty);
|
||||
set => SetValue(TokenProperty, value);
|
||||
}
|
||||
|
||||
@@ -258,7 +258,7 @@ namespace HandyControl.Controls
|
||||
|
||||
public string Text
|
||||
{
|
||||
get => (string)GetValue(TextProperty);
|
||||
get => (string) GetValue(TextProperty);
|
||||
set => SetValue(TextProperty, value);
|
||||
}
|
||||
|
||||
@@ -267,8 +267,8 @@ namespace HandyControl.Controls
|
||||
|
||||
private static void OnIconChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||
{
|
||||
var ctl = (NotifyIcon)d;
|
||||
ctl._icon = (ImageSource)e.NewValue;
|
||||
var ctl = (NotifyIcon) d;
|
||||
ctl._icon = (ImageSource) e.NewValue;
|
||||
ctl.OnIconChanged();
|
||||
|
||||
if (!string.IsNullOrEmpty(ctl._windowClassName) && !ctl.IsBlink && ctl.Visibility == Visibility.Visible)
|
||||
@@ -279,7 +279,7 @@ namespace HandyControl.Controls
|
||||
|
||||
public ImageSource Icon
|
||||
{
|
||||
get => (ImageSource)GetValue(IconProperty);
|
||||
get => (ImageSource) GetValue(IconProperty);
|
||||
set => SetValue(IconProperty, value);
|
||||
}
|
||||
|
||||
@@ -297,16 +297,16 @@ namespace HandyControl.Controls
|
||||
|
||||
private static void OnBlinkIntervalChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||
{
|
||||
var ctl = (NotifyIcon)d;
|
||||
var ctl = (NotifyIcon) d;
|
||||
if (ctl._dispatcherTimerBlink != null)
|
||||
{
|
||||
ctl._dispatcherTimerBlink.Interval = (TimeSpan)e.NewValue;
|
||||
ctl._dispatcherTimerBlink.Interval = (TimeSpan) e.NewValue;
|
||||
}
|
||||
}
|
||||
|
||||
public TimeSpan BlinkInterval
|
||||
{
|
||||
get => (TimeSpan)GetValue(BlinkIntervalProperty);
|
||||
get => (TimeSpan) GetValue(BlinkIntervalProperty);
|
||||
set => SetValue(BlinkIntervalProperty, value);
|
||||
}
|
||||
|
||||
@@ -315,9 +315,9 @@ namespace HandyControl.Controls
|
||||
|
||||
private static void OnIsBlinkChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||
{
|
||||
var ctl = (NotifyIcon)d;
|
||||
var ctl = (NotifyIcon) d;
|
||||
if (ctl.Visibility != Visibility.Visible) return;
|
||||
if ((bool)e.NewValue)
|
||||
if ((bool) e.NewValue)
|
||||
{
|
||||
if (ctl._dispatcherTimerBlink == null)
|
||||
{
|
||||
@@ -339,7 +339,7 @@ namespace HandyControl.Controls
|
||||
|
||||
public bool IsBlink
|
||||
{
|
||||
get => (bool)GetValue(IsBlinkProperty);
|
||||
get => (bool) GetValue(IsBlinkProperty);
|
||||
set => SetValue(IsBlinkProperty, ValueBoxes.BooleanBox(value));
|
||||
}
|
||||
|
||||
@@ -355,10 +355,10 @@ namespace HandyControl.Controls
|
||||
if (!isTrue) return false;
|
||||
|
||||
InteropMethods.GetCursorPos(out var point);
|
||||
return rectNotifyList.Any(rectNotify =>
|
||||
point.X >= rectNotify.Left &&
|
||||
point.X <= rectNotify.Right &&
|
||||
point.Y >= rectNotify.Top &&
|
||||
return rectNotifyList.Any(rectNotify =>
|
||||
point.X >= rectNotify.Left &&
|
||||
point.X <= rectNotify.Right &&
|
||||
point.Y >= rectNotify.Top &&
|
||||
point.Y <= rectNotify.Bottom);
|
||||
}
|
||||
|
||||
@@ -436,7 +436,7 @@ namespace HandyControl.Controls
|
||||
private bool FindNotifyIcon(IntPtr hTrayWnd, ref List<InteropValues.RECT> rectNotifyList)
|
||||
{
|
||||
InteropMethods.GetWindowRect(hTrayWnd, out var rectTray);
|
||||
var count = (int)InteropMethods.SendMessage(hTrayWnd, InteropValues.TB_BUTTONCOUNT, 0, IntPtr.Zero);
|
||||
var count = (int) InteropMethods.SendMessage(hTrayWnd, InteropValues.TB_BUTTONCOUNT, 0, IntPtr.Zero);
|
||||
|
||||
var isFind = false;
|
||||
if (count > 0)
|
||||
@@ -454,20 +454,20 @@ namespace HandyControl.Controls
|
||||
InteropMethods.SendMessage(hTrayWnd, InteropValues.TB_GETBUTTON, i, address);
|
||||
var isTrue = InteropMethods.ReadProcessMemory(hProcess, address, out btnData, Marshal.SizeOf(btnData), out _);
|
||||
if (!isTrue) continue;
|
||||
|
||||
|
||||
if (btnData.dwData == IntPtr.Zero)
|
||||
{
|
||||
btnData.dwData = btnData.iString;
|
||||
}
|
||||
|
||||
|
||||
InteropMethods.ReadProcessMemory(hProcess, btnData.dwData, out trayData, Marshal.SizeOf(trayData), out _);
|
||||
InteropMethods.GetWindowThreadProcessId(trayData.hwnd, out var dwProcessId);
|
||||
|
||||
if (dwProcessId == (uint)handle)
|
||||
if (dwProcessId == (uint) handle)
|
||||
{
|
||||
var rect = new InteropValues.RECT();
|
||||
var lngRect = InteropMethods.VirtualAllocEx(hProcess, IntPtr.Zero, Marshal.SizeOf(typeof(Rect)), InteropValues.AllocationType.Commit, InteropValues.MemoryProtection.ReadWrite);
|
||||
|
||||
|
||||
InteropMethods.SendMessage(hTrayWnd, InteropValues.TB_GETITEMRECT, i, lngRect);
|
||||
InteropMethods.ReadProcessMemory(hProcess, lngRect, out rect, Marshal.SizeOf(rect), out _);
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ namespace HandyControl.Controls
|
||||
}, (o, value) =>
|
||||
{
|
||||
if (!(o is Pagination)) return 1;
|
||||
var intValue = (int)value;
|
||||
var intValue = (int) value;
|
||||
if (intValue < 1)
|
||||
{
|
||||
return 1;
|
||||
@@ -115,7 +115,7 @@ namespace HandyControl.Controls
|
||||
/// </summary>
|
||||
public int MaxPageCount
|
||||
{
|
||||
get => (int)GetValue(MaxPageCountProperty);
|
||||
get => (int) GetValue(MaxPageCountProperty);
|
||||
set => SetValue(MaxPageCountProperty, value);
|
||||
}
|
||||
|
||||
@@ -136,7 +136,7 @@ namespace HandyControl.Controls
|
||||
}, (o, value) =>
|
||||
{
|
||||
if (!(o is Pagination)) return 1;
|
||||
var intValue = (int)value;
|
||||
var intValue = (int) value;
|
||||
if (intValue < 1)
|
||||
{
|
||||
return 1;
|
||||
@@ -149,7 +149,7 @@ namespace HandyControl.Controls
|
||||
/// </summary>
|
||||
public int DataCountPerPage
|
||||
{
|
||||
get => (int)GetValue(DataCountPerPageProperty);
|
||||
get => (int) GetValue(DataCountPerPageProperty);
|
||||
set => SetValue(DataCountPerPageProperty, value);
|
||||
}
|
||||
|
||||
@@ -174,7 +174,7 @@ namespace HandyControl.Controls
|
||||
}, (o, value) =>
|
||||
{
|
||||
if (!(o is Pagination pagination)) return 1;
|
||||
var intValue = (int)value;
|
||||
var intValue = (int) value;
|
||||
if (intValue < 0)
|
||||
{
|
||||
return 0;
|
||||
@@ -188,7 +188,7 @@ namespace HandyControl.Controls
|
||||
/// </summary>
|
||||
public int PageIndex
|
||||
{
|
||||
get => (int)GetValue(PageIndexProperty);
|
||||
get => (int) GetValue(PageIndexProperty);
|
||||
set => SetValue(PageIndexProperty, value);
|
||||
}
|
||||
|
||||
@@ -208,7 +208,7 @@ namespace HandyControl.Controls
|
||||
}
|
||||
}), value =>
|
||||
{
|
||||
var intValue = (int)value;
|
||||
var intValue = (int) value;
|
||||
return intValue >= 0;
|
||||
});
|
||||
|
||||
@@ -217,7 +217,7 @@ namespace HandyControl.Controls
|
||||
/// </summary>
|
||||
public int MaxPageInterval
|
||||
{
|
||||
get => (int)GetValue(MaxPageIntervalProperty);
|
||||
get => (int) GetValue(MaxPageIntervalProperty);
|
||||
set => SetValue(MaxPageIntervalProperty, value);
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace HandyControl.Controls
|
||||
Child = this
|
||||
};
|
||||
|
||||
_popup.SetBinding(DataContextProperty, new Binding(DataContextProperty.Name) {Source = this});
|
||||
_popup.SetBinding(DataContextProperty, new Binding(DataContextProperty.Name) { Source = this });
|
||||
}
|
||||
|
||||
public static readonly DependencyProperty HitModeProperty = DependencyProperty.RegisterAttached(
|
||||
@@ -35,7 +35,7 @@ namespace HandyControl.Controls
|
||||
|
||||
public HitMode HitMode
|
||||
{
|
||||
get => (HitMode)GetValue(HitModeProperty);
|
||||
get => (HitMode) GetValue(HitModeProperty);
|
||||
set => SetValue(HitModeProperty, value);
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ namespace HandyControl.Controls
|
||||
|
||||
public DataTemplate ContentTemplate
|
||||
{
|
||||
get => (DataTemplate)GetValue(ContentTemplateProperty);
|
||||
get => (DataTemplate) GetValue(ContentTemplateProperty);
|
||||
set => SetValue(ContentTemplateProperty, value);
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ namespace HandyControl.Controls
|
||||
|
||||
public string ContentStringFormat
|
||||
{
|
||||
get => (string)GetValue(ContentStringFormatProperty);
|
||||
get => (string) GetValue(ContentStringFormatProperty);
|
||||
set => SetValue(ContentStringFormatProperty, value);
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ namespace HandyControl.Controls
|
||||
|
||||
public DataTemplateSelector ContentTemplateSelector
|
||||
{
|
||||
get => (DataTemplateSelector)GetValue(ContentTemplateSelectorProperty);
|
||||
get => (DataTemplateSelector) GetValue(ContentTemplateSelectorProperty);
|
||||
set => SetValue(ContentTemplateSelectorProperty, value);
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ namespace HandyControl.Controls
|
||||
|
||||
public double Offset
|
||||
{
|
||||
get => (double)GetValue(OffsetProperty);
|
||||
get => (double) GetValue(OffsetProperty);
|
||||
set => SetValue(OffsetProperty, value);
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@ namespace HandyControl.Controls
|
||||
|
||||
public PlacementType PlacementType
|
||||
{
|
||||
get => (PlacementType)GetValue(PlacementTypeProperty);
|
||||
get => (PlacementType) GetValue(PlacementTypeProperty);
|
||||
set => SetValue(PlacementTypeProperty, value);
|
||||
}
|
||||
|
||||
@@ -132,7 +132,7 @@ namespace HandyControl.Controls
|
||||
}
|
||||
else
|
||||
{
|
||||
((Poptip)GetInstance(d))?.SwitchPoptip((bool)e.NewValue);
|
||||
((Poptip) GetInstance(d))?.SwitchPoptip((bool) e.NewValue);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -191,7 +191,7 @@ namespace HandyControl.Controls
|
||||
var offsetX = .0;
|
||||
var offsetY = .0;
|
||||
|
||||
var poptip = (Poptip)GetInstance(Target);
|
||||
var poptip = (Poptip) GetInstance(Target);
|
||||
var popupPlacement = poptip.PlacementType;
|
||||
var popupOffset = poptip.Offset;
|
||||
|
||||
|
||||
@@ -147,7 +147,7 @@ namespace HandyControl.Controls
|
||||
|
||||
public static void SetIsInertiaEnabled(DependencyObject element, bool value) => element.SetValue(IsInertiaEnabledProperty, ValueBoxes.BooleanBox(value));
|
||||
|
||||
public static bool GetIsInertiaEnabled(DependencyObject element) => (bool)element.GetValue(IsInertiaEnabledProperty);
|
||||
public static bool GetIsInertiaEnabled(DependencyObject element) => (bool) element.GetValue(IsInertiaEnabledProperty);
|
||||
|
||||
/// <summary>
|
||||
/// 是否支持惯性
|
||||
@@ -224,4 +224,4 @@ namespace HandyControl.Controls
|
||||
set => SetValue(CurrentHorizontalOffsetProperty, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -35,4 +35,4 @@ namespace HandyControl.Controls
|
||||
set => SetValue(ColorProperty, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -24,7 +24,7 @@ namespace HandyControl.Controls
|
||||
{
|
||||
_isLeftButtonPressed = true;
|
||||
}
|
||||
else if(_isLeftButtonPressed)
|
||||
else if (_isLeftButtonPressed)
|
||||
{
|
||||
if (Left < 0)
|
||||
{
|
||||
@@ -61,4 +61,4 @@ namespace HandyControl.Controls
|
||||
return sprite;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -144,7 +144,7 @@ namespace HandyControl.Controls
|
||||
Background = Brushes.Transparent,
|
||||
Padding = MarkMargin,
|
||||
Child = presenter
|
||||
}),
|
||||
}),
|
||||
Geometry = new RectangleGeometry(new Rect(markSize))
|
||||
},
|
||||
Viewport = new Rect(markSize)
|
||||
|
||||
Reference in new issue
Block a user