From 82c6509c7ad028b045705b04180cb40440e6ece4 Mon Sep 17 00:00:00 2001
From: NaBian <836904362@qq.com>
Date: Fri, 12 Oct 2018 20:03:59 +0800
Subject: [PATCH] refactor ImageBrowser, add NumericUpDown, delete info
controls
---
HandyControl/Controls/Info/InfoControl.cs | 374 ------------------
.../Controls/Info/InfoNumericUpDown.xaml | 66 ----
.../Controls/Info/InfoNumericUpDown.xaml.cs | 181 ---------
HandyControl/Controls/Info/InfoTextBox.xaml | 62 ---
.../Controls/Info/InfoTextBox.xaml.cs | 45 ---
HandyControl/Controls/NumericUpDown.cs | 257 ++++++++++++
HandyControl/Controls/Picker/ColorPicker.xaml | 25 +-
.../Controls/Picker/ColorPicker.xaml.cs | 5 +-
HandyControl/Controls/TimeBar/TimeBar.cs | 3 +-
.../{ImageBrowser.xaml.cs => ImageBrowser.cs} | 241 +++++++----
.../Controls/Window/ImageBrowser.xaml | 81 ----
HandyControl/HandyControl.csproj | 35 +-
HandyControl/Interactivity/ControlCommands.cs | 37 +-
HandyControl/Properties/AssemblyInfo.cs | 4 +-
HandyControl/Resources/colorPickerBack.png | Bin 34435 -> 0 bytes
.../Themes/Styles/Base/ComboBoxBaseStyle.xaml | 1 -
.../Styles/Base/DatePickerBaseStyle.xaml | 1 -
.../Styles/Base/NumericUpDownBaseStyle.xaml | 60 +++
.../Styles/Base/PasswordBoxBaseStyle.xaml | 1 -
.../Themes/Styles/Base/TextBoxBaseStyle.xaml | 1 -
.../Styles/Base/TimePickerBaseStyle.xaml | 1 -
.../Styles/Base/ToggleButtonBaseStyle.xaml | 3 -
HandyControl/Themes/Styles/Border.xaml | 4 +-
HandyControl/Themes/Styles/Button.xaml | 4 +-
HandyControl/Themes/Styles/NumericUpDown.xaml | 13 +
HandyControl/Themes/Styles/Style.xaml | 1 +
HandyControl/Themes/Styles/Window.xaml | 79 ++++
HandyControlDemo/Data/MessageToken.cs | 2 +
HandyControlDemo/Data/MessageToken.tt | 3 +-
HandyControlDemo/HandyControlDemo.csproj | 7 +
HandyControlDemo/Properties/AssemblyInfo.cs | 4 +-
.../Properties/Langs/Lang.Designer.cs | 9 +
.../Properties/Langs/Lang.en.resx | 3 +
HandyControlDemo/Properties/Langs/Lang.resx | 3 +
.../Controls/NumericUpDownDemoCtl.xaml | 11 +
.../Controls/NumericUpDownDemoCtl.xaml.cs | 11 +
.../UserControl/Main/LeftMainContent.xaml | 39 +-
37 files changed, 712 insertions(+), 965 deletions(-)
delete mode 100644 HandyControl/Controls/Info/InfoControl.cs
delete mode 100644 HandyControl/Controls/Info/InfoNumericUpDown.xaml
delete mode 100644 HandyControl/Controls/Info/InfoNumericUpDown.xaml.cs
delete mode 100644 HandyControl/Controls/Info/InfoTextBox.xaml
delete mode 100644 HandyControl/Controls/Info/InfoTextBox.xaml.cs
create mode 100644 HandyControl/Controls/NumericUpDown.cs
rename HandyControl/Controls/Window/{ImageBrowser.xaml.cs => ImageBrowser.cs} (73%)
delete mode 100644 HandyControl/Controls/Window/ImageBrowser.xaml
delete mode 100644 HandyControl/Resources/colorPickerBack.png
create mode 100644 HandyControl/Themes/Styles/Base/NumericUpDownBaseStyle.xaml
create mode 100644 HandyControl/Themes/Styles/NumericUpDown.xaml
create mode 100644 HandyControlDemo/UserControl/Controls/NumericUpDownDemoCtl.xaml
create mode 100644 HandyControlDemo/UserControl/Controls/NumericUpDownDemoCtl.xaml.cs
diff --git a/HandyControl/Controls/Info/InfoControl.cs b/HandyControl/Controls/Info/InfoControl.cs
deleted file mode 100644
index 2b7eace3..00000000
--- a/HandyControl/Controls/Info/InfoControl.cs
+++ /dev/null
@@ -1,374 +0,0 @@
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Input;
-using System.Windows.Media.Animation;
-using HandyControl.Data.Enum;
-using HandyControl.Tools;
-using HandyControl.Tools.Converter;
-using HandyControl.Tools.Extension;
-
-// ReSharper disable once CheckNamespace
-namespace HandyControl.Controls
-{
- internal abstract class InfoControl : UserControl
- {
- private bool _isFocused;
-
- protected TextBlock ErrorTextBlock;
-
- protected TextBox ContentTextBox;
-
- protected StackPanel TitleStackPanel;
-
- ///
- /// 标题
- ///
- public static readonly DependencyProperty TitleProperty = DependencyProperty.Register(
- "Title", typeof(string), typeof(InfoControl), new PropertyMetadata(default(string)));
-
- ///
- /// 标题
- ///
- public string Title
- {
- get => (string)GetValue(TitleProperty);
- set => SetValue(TitleProperty, value);
- }
-
- ///
- /// 文本
- ///
- public static readonly DependencyProperty TextProperty = DependencyProperty.Register(
- "Text", typeof(string), typeof(InfoControl), new FrameworkPropertyMetadata(default(string), FrameworkPropertyMetadataOptions.BindsTwoWayByDefault));
-
- ///
- /// 文本
- ///
- public string Text
- {
- get => (string)GetValue(TextProperty);
- set => SetValue(TextProperty, value);
- }
-
- ///
- /// 是否为必填项
- ///
- public static readonly DependencyProperty IsNeedlyProperty = DependencyProperty.Register(
- "IsNeedly", typeof(bool), typeof(InfoControl), new PropertyMetadata(true));
-
- ///
- /// 是否为必填项
- ///
- public bool IsNeedly
- {
- get => (bool)GetValue(IsNeedlyProperty);
- set => SetValue(IsNeedlyProperty, value);
- }
-
- ///
- /// 占位符
- ///
- public static readonly DependencyProperty PlaceHolderProperty = DependencyProperty.Register(
- "PlaceHolder", typeof(string), typeof(InfoControl), new PropertyMetadata(default(string)));
-
- ///
- /// 占位符
- ///
- public string PlaceHolder
- {
- get => (string)GetValue(PlaceHolderProperty);
- set => SetValue(PlaceHolderProperty, value);
- }
-
- ///
- /// 错误信息
- ///
- public static readonly DependencyProperty ErrorStrProperty = DependencyProperty.Register(
- "ErrorStr", typeof(string), typeof(InfoControl), new PropertyMetadata(default(string)));
-
- ///
- /// 错误信息
- ///
- public string ErrorStr
- {
- get => (string)GetValue(ErrorStrProperty);
- set => SetValue(ErrorStrProperty, value);
- }
-
- ///
- /// 控件是否包含错误
- ///
- public static readonly DependencyProperty IsErrorProperty = DependencyProperty.Register(
- "IsError", typeof(bool), typeof(InfoControl), new PropertyMetadata(default(bool)));
-
- ///
- /// 控件是否包含错误
- ///
- public bool IsError
- {
- get => (bool)GetValue(IsErrorProperty);
- set => SetValue(IsErrorProperty, value);
- }
-
- ///
- /// 标题宽度
- ///
- public static readonly DependencyProperty TitleWidthProperty = DependencyProperty.RegisterAttached(
- "TitleWidth", typeof(GridLength), typeof(InfoControl),
- new FrameworkPropertyMetadata(GridLength.Auto, FrameworkPropertyMetadataOptions.Inherits));
-
- ///
- /// 设置标题宽度
- ///
- public static void SetTitleWidth(DependencyObject element, GridLength value)
- {
- element.SetValue(TitleWidthProperty, value);
- }
-
- ///
- /// 标题宽度
- ///
- public static GridLength GetTitleWidth(DependencyObject element)
- {
- return (GridLength)element.GetValue(TitleWidthProperty);
- }
-
- ///
- /// 标题宽度
- ///
- public GridLength TitleWidth
- {
- get => (GridLength)GetValue(TitleWidthProperty);
- set => SetValue(TitleWidthProperty, value);
- }
-
- ///
- /// 标题对齐方式
- ///
- public static readonly DependencyProperty TitleAlignmentProperty = DependencyProperty.Register(
- "TitleAlignment", typeof(TitleAlignment), typeof(InfoControl), new PropertyMetadata(TitleAlignment.Left,
- (o, args) =>
- {
- var ctl = (InfoControl)o;
- var v = (TitleAlignment)args.NewValue;
- if (v == TitleAlignment.Left)
- {
- Grid.SetColumn(ctl.TitleStackPanel, 0);
- Grid.SetRow(ctl.TitleStackPanel, 1);
- ctl.HorizontalAlignment = HorizontalAlignment.Right;
- ctl.Height = ctl.MaxHeight;
- }
- else
- {
- Grid.SetColumn(ctl.TitleStackPanel, 1);
- Grid.SetRow(ctl.TitleStackPanel, 0);
- ctl.TitleStackPanel.HorizontalAlignment = HorizontalAlignment.Left;
- ctl.TitleStackPanel.Margin = new Thickness(4, 0, 0, 4);
- ctl.Height += 18;
- }
- }));
-
- ///
- /// 标题对齐方式
- ///
- public TitleAlignment TitleAlignment
- {
- get => (TitleAlignment)GetValue(TitleAlignmentProperty);
- set => SetValue(TitleAlignmentProperty, value);
- }
-
- ///
- /// 文本的水平对齐方式
- ///
- public static readonly DependencyProperty HorizontalTextAlignmentProperty = DependencyProperty.Register(
- "HorizontalTextAlignment", typeof(HorizontalAlignment), typeof(InfoControl), new PropertyMetadata(HorizontalAlignment.Left));
-
- ///
- /// 文本的水平对齐方式
- ///
- public HorizontalAlignment HorizontalTextAlignment
- {
- get => (HorizontalAlignment)GetValue(HorizontalTextAlignmentProperty);
- set => SetValue(HorizontalTextAlignmentProperty, value);
- }
-
- ///
- /// 是否显示清除按钮
- ///
- public static readonly DependencyProperty ShowClearButtonProperty = DependencyProperty.Register(
- "ShowClearButton", typeof(bool), typeof(InfoControl), new PropertyMetadata(true, (o, args) =>
- {
- var ctl = (InfoControl)o;
- var v = (bool)args.NewValue;
- if (!(ctl.FindName("ButtonClear") is Button button)) return;
- BindingOperations.ClearBinding(button, VisibilityProperty);
- button.IsEnabled = v;
- if (v)
- {
- button.SetBinding(VisibilityProperty, new Binding("Text")
- {
- Source = ctl,
- Converter = new String2VisibilityConverter()
- });
- }
- else
- {
- button.Collapse();
- }
- }));
-
- ///
- /// 是否显示清除按钮
- ///
- public bool ShowClearButton
- {
- get => (bool)GetValue(ShowClearButtonProperty);
- set => SetValue(ShowClearButtonProperty, value);
- }
-
- ///
- /// 是否显示小圆角
- ///
- public static readonly DependencyProperty ShowSmallCornerRadiusProperty = DependencyProperty.Register(
- "ShowSmallCornerRadius", typeof(bool), typeof(InfoControl), new PropertyMetadata(default(bool), (o, args) =>
- {
- var ctl = (InfoControl)o;
- var v = (bool)args.NewValue;
- ctl.CornerRadius = v ? new CornerRadius(2, 2, 2, 2) : new CornerRadius(4, 4, 4, 4);
- }));
-
- ///
- /// 是否显示小圆角
- ///
- public bool ShowSmallCornerRadius
- {
- get => (bool)GetValue(ShowSmallCornerRadiusProperty);
- set => SetValue(ShowSmallCornerRadiusProperty, value);
- }
-
- ///
- /// 圆角
- ///
- protected static readonly DependencyProperty CornerRadiusProperty = DependencyProperty.Register(
- "CornerRadius", typeof(CornerRadius), typeof(InfoControl), new PropertyMetadata(new CornerRadius(4, 4, 4, 4)));
-
- ///
- /// 圆角
- ///
- protected CornerRadius CornerRadius
- {
- get => (CornerRadius)GetValue(CornerRadiusProperty);
- set => SetValue(CornerRadiusProperty, value);
- }
-
- ///
- /// 文本内边距
- ///
- public static readonly DependencyProperty TextPaddingProperty = DependencyProperty.Register(
- "TextPadding", typeof(Thickness), typeof(InfoControl), new PropertyMetadata(new Thickness(6, 0, 0, 0)));
-
- ///
- /// 文本内边距
- ///
- public Thickness TextPadding
- {
- get => (Thickness)GetValue(TextPaddingProperty);
- set => SetValue(TextPaddingProperty, value);
- }
-
- ///
- /// 更新状态
- ///
- public virtual void Update()
- {
- if (!IsError)
- {
- if (!_isFocused)
- {
- (TryFindResource("Storyboard2") as Storyboard)?.Begin();
- }
- else
- {
- (TryFindResource("Storyboard3") as Storyboard)?.Begin();
- }
- ErrorTextBlock.BeginAnimation(MarginProperty, AnimationHelper.CreateAnimation(new Thickness(4, 0, 0, 1)));
- return;
- }
- (TryFindResource("Storyboard4") as Storyboard)?.Begin();
- ErrorTextBlock.BeginAnimation(MarginProperty, AnimationHelper.CreateAnimation(new Thickness(4, 0, 0, -ErrorTextBlock.ActualHeight - 2)));
- }
-
- protected virtual void InputBox_OnLostFocus(object sender, RoutedEventArgs e)
- {
- _isFocused = false;
- CheckInfo();
- }
-
- protected virtual void InputBox_OnGotFocus(object sender, RoutedEventArgs e)
- {
- _isFocused = true;
- if (!IsError)
- {
- (TryFindResource("Storyboard3") as Storyboard)?.Begin();
- }
- }
-
- protected virtual void InputBox_OnMouseEnter(object sender, MouseEventArgs e)
- {
- if (!IsError && !ContentTextBox.IsFocused)
- {
- (TryFindResource("Storyboard1") as Storyboard)?.Begin();
- }
- }
-
- protected virtual void InputBox_OnMouseLeave(object sender, MouseEventArgs e)
- {
- if (!IsError && !ContentTextBox.IsFocused)
- {
- (TryFindResource("Storyboard2") as Storyboard)?.Begin();
- }
- }
-
- protected virtual void InputBox_OnTextChanged(object sender, TextChangedEventArgs e) => CheckInfo();
-
- protected virtual void ButtonClear_OnClick(object sender, RoutedEventArgs e) => Text = string.Empty;
-
- ///
- /// 文本类型
- ///
- public TextType TextType { get; set; }
-
- ///
- /// 正则字符串(当文本类型为Common时,此属性才生效)
- ///
- public string RegularStr { get; set; }
-
- ///
- /// 用于监测数据的正确性
- ///
- ///
- public virtual bool CheckInfo()
- {
- bool result;
- if (TextType == TextType.Common)
- {
- if (string.IsNullOrEmpty(RegularStr))
- {
- result = !IsNeedly || !string.IsNullOrEmpty(Text);
- }
- else
- {
- result = Text.IsKindOf(RegularStr);
- }
- }
- else
- {
- result = Text.IsKindOf(TextType);
- }
- IsError = !result;
- Update();
- return result;
- }
- }
-}
\ No newline at end of file
diff --git a/HandyControl/Controls/Info/InfoNumericUpDown.xaml b/HandyControl/Controls/Info/InfoNumericUpDown.xaml
deleted file mode 100644
index 65c786c3..00000000
--- a/HandyControl/Controls/Info/InfoNumericUpDown.xaml
+++ /dev/null
@@ -1,66 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/HandyControl/Controls/Info/InfoNumericUpDown.xaml.cs b/HandyControl/Controls/Info/InfoNumericUpDown.xaml.cs
deleted file mode 100644
index de4606f6..00000000
--- a/HandyControl/Controls/Info/InfoNumericUpDown.xaml.cs
+++ /dev/null
@@ -1,181 +0,0 @@
-using System;
-using System.Windows;
-using System.Windows.Input;
-using System.Windows.Media.Animation;
-using HandyControl.Data;
-using HandyControl.Tools;
-
-// ReSharper disable once CheckNamespace
-namespace HandyControl.Controls
-{
- ///
- /// InfoNumericUpDown.xaml 的交互逻辑
- ///
- internal partial class InfoNumericUpDown
- {
- public InfoNumericUpDown()
- {
- InitializeComponent();
-
- ErrorTextBlock = TextBlockError;
- ContentTextBox = MyTextBox;
- TitleStackPanel = StackPanelTitle;
-
- (TryFindResource("Storyboard2") as Storyboard)?.Begin();
-
- Loaded += (s, e) =>
- {
- StackPanelTitle.Focusable = true;
- StackPanelTitle.Focus();
- StackPanelTitle.Focusable = false;
- };
- }
-
- ///
- /// 最大值
- ///
- public static readonly DependencyProperty MaximumProperty = DependencyProperty.Register(
- "Maximum", typeof(double), typeof(InfoNumericUpDown), new PropertyMetadata(100.0, (o, args) =>
- {
- o.CoerceValue(MinimumProperty);
- o.CoerceValue(ValueProperty);
- }, (o, value) =>
- {
- var info = (InfoNumericUpDown)o;
- var max = (double)value;
- if (max < info.Minimum) max = info.Minimum;
- return max;
- }), ValidateHelper.IsInRangeOfDouble);
-
- ///
- /// 最大值
- ///
- public double Maximum
- {
- get => (double)GetValue(MaximumProperty);
- set => SetValue(MaximumProperty, value);
- }
-
- ///
- /// 最小值
- ///
- public static readonly DependencyProperty MinimumProperty = DependencyProperty.Register(
- "Minimum", typeof(double), typeof(InfoNumericUpDown), new PropertyMetadata(0.0, (o, args) =>
- {
- o.CoerceValue(MaximumProperty);
- o.CoerceValue(ValueProperty);
- }, (o, value) =>
- {
- var info = (InfoNumericUpDown)o;
- var min = (double)value;
- if (min > info.Maximum) min = info.Maximum;
- return min;
- }), ValidateHelper.IsInRangeOfDouble);
-
- ///
- /// 最小值
- ///
- public double Minimum
- {
- get => (double)GetValue(MinimumProperty);
- set => SetValue(MinimumProperty, value);
- }
-
- ///
- /// 当前值
- ///
- public static readonly DependencyProperty ValueProperty = DependencyProperty.Register(
- "Value", typeof(double), typeof(InfoNumericUpDown), new PropertyMetadata(1.0, (o, args) =>
- {
- o.CoerceValue(MinimumProperty);
- o.CoerceValue(MaximumProperty);
- var ctl = (InfoNumericUpDown)o;
- ctl.RaiseEvent(new FunctionEventArgs(ValueChangedEvent, ctl)
- {
- Info = (double)args.NewValue
- });
- }, (o, value) =>
- {
- var info = (InfoNumericUpDown)o;
- var current = (double)value;
-
- if (current < info.Minimum) current = info.Minimum;
- if (current > info.Maximum) current = info.Maximum;
-
- return current;
- }), ValidateHelper.IsInRangeOfDouble);
-
- ///
- /// 当前值
- ///
- public double Value
- {
- get => (double)GetValue(ValueProperty);
- set => SetValue(ValueProperty, value);
- }
-
- ///
- /// 最小改变值
- ///
- public static readonly DependencyProperty SmallChangeProperty = DependencyProperty.Register(
- "SmallChange", typeof(double), typeof(InfoNumericUpDown), new PropertyMetadata(1.0), ValidateHelper.IsInRangeOfDouble);
-
- ///
- /// 最小改变值
- ///
- public double SmallChange
- {
- get => (double)GetValue(SmallChangeProperty);
- set => SetValue(SmallChangeProperty, value);
- }
-
- ///
- /// 是否显示上下调整按钮
- ///
- public static readonly DependencyProperty ShowUpDownButtonProperty = DependencyProperty.Register(
- "ShowUpDownButton", typeof(bool), typeof(InfoNumericUpDown), new PropertyMetadata(true));
-
- ///
- /// 是否显示上下调整按钮
- ///
- public bool ShowUpDownButton
- {
- get => (bool)GetValue(ShowUpDownButtonProperty);
- set => SetValue(ShowUpDownButtonProperty, value);
- }
-
- ///
- /// 值改变事件
- ///
- public static readonly RoutedEvent ValueChangedEvent =
- EventManager.RegisterRoutedEvent("ValueChanged", RoutingStrategy.Bubble,
- typeof(EventHandler>), typeof(InfoNumericUpDown));
-
- ///
- /// 值改变事件
- ///
- public event EventHandler> ValueChanged
- {
- add => AddHandler(ValueChangedEvent, value);
- remove => RemoveHandler(ValueChangedEvent, value);
- }
-
- private void ButtonUp_OnClick(object sender, RoutedEventArgs e) => Value += SmallChange;
-
- private void ButtonDown_OnClick(object sender, RoutedEventArgs e) => Value -= SmallChange;
-
- private void MyTextBox_OnMouseWheel(object sender, MouseWheelEventArgs e)
- {
- if (e.Delta > 0)
- {
- Value += SmallChange;
- }
- else
- {
- Value -= SmallChange;
- }
- MyTextBox.Select(MyTextBox.Text.Length, 0);
- e.Handled = true;
- }
- }
-}
\ No newline at end of file
diff --git a/HandyControl/Controls/Info/InfoTextBox.xaml b/HandyControl/Controls/Info/InfoTextBox.xaml
deleted file mode 100644
index 364e462a..00000000
--- a/HandyControl/Controls/Info/InfoTextBox.xaml
+++ /dev/null
@@ -1,62 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/HandyControl/Controls/Info/InfoTextBox.xaml.cs b/HandyControl/Controls/Info/InfoTextBox.xaml.cs
deleted file mode 100644
index c633d476..00000000
--- a/HandyControl/Controls/Info/InfoTextBox.xaml.cs
+++ /dev/null
@@ -1,45 +0,0 @@
-using System.Windows;
-using System.Windows.Media.Animation;
-
-// ReSharper disable once CheckNamespace
-namespace HandyControl.Controls
-{
- ///
- /// InfoTextBox.xaml 的交互逻辑
- ///
- internal partial class InfoTextBox
- {
- ///
- /// 可输入的最大字符数
- ///
- public static readonly DependencyProperty MaxLengthProperty = DependencyProperty.Register(
- "MaxLength", typeof(int), typeof(InfoTextBox), new PropertyMetadata(default(int)));
-
- ///
- /// 可输入的最大字符数
- ///
- public int MaxLength
- {
- get => (int)GetValue(MaxLengthProperty);
- set => SetValue(MaxLengthProperty, value);
- }
-
- public InfoTextBox()
- {
- InitializeComponent();
-
- ErrorTextBlock = TextBlockError;
- ContentTextBox = MyTextBox;
- TitleStackPanel = StackPanelTitle;
-
- (TryFindResource("Storyboard2") as Storyboard)?.Begin();
-
- Loaded += (s, e) =>
- {
- StackPanelTitle.Focusable = true;
- StackPanelTitle.Focus();
- StackPanelTitle.Focusable = false;
- };
- }
- }
-}
\ No newline at end of file
diff --git a/HandyControl/Controls/NumericUpDown.cs b/HandyControl/Controls/NumericUpDown.cs
new file mode 100644
index 00000000..90dde33d
--- /dev/null
+++ b/HandyControl/Controls/NumericUpDown.cs
@@ -0,0 +1,257 @@
+using System;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Input;
+using HandyControl.Data;
+using HandyControl.Interactivity;
+
+namespace HandyControl.Controls
+{
+ ///
+ /// 数值选择控件
+ ///
+ [TemplatePart(Name = ElementTextBox, Type = typeof(TextBox))]
+ public class NumericUpDown : Control
+ {
+ #region Constants
+
+ private const string ElementTextBox = "PART_TextBox";
+
+ #endregion Constants
+
+ #region Data
+
+ private TextBox _textBox;
+
+ #endregion Data
+
+ public NumericUpDown()
+ {
+ CommandBindings.Add(new CommandBinding(ControlCommands.Prev, (s, e) => Value += Increment));
+ CommandBindings.Add(new CommandBinding(ControlCommands.Next, (s, e) => Value -= Increment));
+ }
+
+ protected override void OnGotFocus(RoutedEventArgs e)
+ {
+ base.OnGotFocus(e);
+
+ if (_textBox != null)
+ {
+ _textBox?.Focus();
+ _textBox.Select(_textBox.Text.Length, 0);
+ }
+ }
+
+ public override void OnApplyTemplate()
+ {
+ if (_textBox != null)
+ {
+ _textBox.PreviewTextInput -= TextBoxValue_TextInput;
+ }
+
+ base.OnApplyTemplate();
+
+ _textBox = GetTemplateChild(ElementTextBox) as TextBox;
+
+ if (_textBox != null)
+ {
+ _textBox.PreviewTextInput += TextBoxValue_TextInput;
+ _textBox.Text = Value.ToString($"#0.{new string('0', DecimalPlaces)}");
+ }
+ }
+
+ private void TextBoxValue_TextInput(object sender, TextCompositionEventArgs e)
+ {
+ if (double.TryParse(_textBox.Text, out var value))
+ {
+ Value = value;
+ }
+
+ if (_textBox != null)
+ {
+ _textBox.Text = Value.ToString($"#0.{new string('0', DecimalPlaces)}");
+ _textBox.Select(_textBox.Text.Length, 0);
+ }
+ }
+
+ protected override void OnMouseWheel(MouseWheelEventArgs e)
+ {
+ base.OnMouseWheel(e);
+
+ if (_textBox.IsFocused)
+ {
+ Value += e.Delta > 0 ? Increment : -Increment;
+ e.Handled = true;
+ }
+ }
+
+ protected virtual void OnValueChanged(FunctionEventArgs e) => RaiseEvent(e);
+
+ ///
+ /// 值改变事件
+ ///
+ public static readonly RoutedEvent ValueChangedEvent =
+ EventManager.RegisterRoutedEvent("ValueChanged", RoutingStrategy.Bubble,
+ typeof(EventHandler>), typeof(NumericUpDown));
+
+ ///
+ /// 值改变事件
+ ///
+ public event EventHandler> ValueChanged
+ {
+ add => AddHandler(ValueChangedEvent, value);
+ remove => RemoveHandler(ValueChangedEvent, value);
+ }
+
+ ///
+ /// 当前值
+ ///
+ public static readonly DependencyProperty ValueProperty = DependencyProperty.Register(
+ "Value", typeof(double), typeof(NumericUpDown), new PropertyMetadata(default(double), OnValueChanged, CoerceValue), IsValidDoubleValue);
+
+ private static void OnValueChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
+ {
+ var ctl = (NumericUpDown) d;
+ var v = (double) e.NewValue;
+ if (ctl._textBox != null)
+ {
+ ctl._textBox.Text = v.ToString($"#0.{new string('0', ctl.DecimalPlaces)}");
+ ctl._textBox.Select(ctl._textBox.Text.Length, 0);
+ }
+ ctl.OnValueChanged(new FunctionEventArgs(ValueChangedEvent, ctl)
+ {
+ Info = v
+ });
+ }
+
+ private static object CoerceValue(DependencyObject d, object basevalue)
+ {
+ var ctl = (NumericUpDown)d;
+ var minimum = ctl.Minimum;
+ var num = (double)basevalue;
+ if (num < minimum)
+ {
+ ctl.Value = minimum;
+ return minimum;
+ }
+ var maximum = ctl.Maximum;
+ if (num > maximum)
+ {
+ ctl.Value = maximum;
+ }
+ return num > maximum ? maximum : basevalue;
+ }
+
+ ///
+ /// 当前值
+ ///
+ public double Value
+ {
+ get => (double) GetValue(ValueProperty);
+ set => SetValue(ValueProperty, value);
+ }
+
+ ///
+ /// 最大值
+ ///
+ public static readonly DependencyProperty MaximumProperty = DependencyProperty.Register(
+ "Maximum", typeof(double), typeof(NumericUpDown), new PropertyMetadata(100.0, OnMaximumChanged, CoerceMaximum), IsValidDoubleValue);
+
+ private static void OnMaximumChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
+ {
+ var ctl = (NumericUpDown)d;
+ ctl.CoerceValue(MinimumProperty);
+ ctl.CoerceValue(ValueProperty);
+ }
+
+ private static object CoerceMaximum(DependencyObject d, object basevalue)
+ {
+ var minimum = ((NumericUpDown)d).Minimum;
+ return (double)basevalue < minimum ? minimum : basevalue;
+ }
+
+ ///
+ /// 最大值
+ ///
+ public double Maximum
+ {
+ get => (double) GetValue(MaximumProperty);
+ set => SetValue(MaximumProperty, value);
+ }
+
+ ///
+ /// 最小值
+ ///
+ public static readonly DependencyProperty MinimumProperty = DependencyProperty.Register(
+ "Minimum", typeof(double), typeof(NumericUpDown), new PropertyMetadata(default(double), OnMinimumChanged, CoerceMinimum), IsValidDoubleValue);
+
+ private static void OnMinimumChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
+ {
+ var ctl = (NumericUpDown)d;
+ ctl.CoerceValue(MaximumProperty);
+ ctl.CoerceValue(ValueProperty);
+ }
+
+ private static object CoerceMinimum(DependencyObject d, object basevalue)
+ {
+ var maximum = ((NumericUpDown)d).Maximum;
+ return (double)basevalue > maximum ? maximum : basevalue;
+ }
+
+ ///
+ /// 最小值
+ ///
+ public double Minimum
+ {
+ get => (double) GetValue(MinimumProperty);
+ set => SetValue(MinimumProperty, value);
+ }
+
+ private static bool IsValidDoubleValue(object value)
+ {
+ var d = (double)value;
+ if (!double.IsNaN(d))
+ return !double.IsInfinity(d);
+ return false;
+ }
+
+ ///
+ /// 指示每单击一下按钮时增加或减少的数量
+ ///
+ public static readonly DependencyProperty IncrementProperty = DependencyProperty.Register(
+ "Increment", typeof(double), typeof(NumericUpDown), new PropertyMetadata(1.0));
+
+ ///
+ /// 指示每单击一下按钮时增加或减少的数量
+ ///
+ public double Increment
+ {
+ get => (double) GetValue(IncrementProperty);
+ set => SetValue(IncrementProperty, value);
+ }
+
+ ///
+ /// 指示要显示的小数位数
+ ///
+ public static readonly DependencyProperty DecimalPlacesProperty = DependencyProperty.Register(
+ "DecimalPlaces", typeof(int), typeof(NumericUpDown), new PropertyMetadata(default(int)));
+
+ ///
+ /// 指示要显示的小数位数
+ ///
+ public int DecimalPlaces
+ {
+ get => (int) GetValue(DecimalPlacesProperty);
+ set => SetValue(DecimalPlacesProperty, value);
+ }
+
+ internal static readonly DependencyProperty ShowUpDownButtonProperty = DependencyProperty.Register(
+ "ShowUpDownButton", typeof(bool), typeof(NumericUpDown), new PropertyMetadata(true));
+
+ internal bool ShowUpDownButton
+ {
+ get => (bool) GetValue(ShowUpDownButtonProperty);
+ set => SetValue(ShowUpDownButtonProperty, value);
+ }
+ }
+}
\ No newline at end of file
diff --git a/HandyControl/Controls/Picker/ColorPicker.xaml b/HandyControl/Controls/Picker/ColorPicker.xaml
index b6d8951f..3ca152cb 100644
--- a/HandyControl/Controls/Picker/ColorPicker.xaml
+++ b/HandyControl/Controls/Picker/ColorPicker.xaml
@@ -22,7 +22,20 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -58,21 +71,21 @@
-
+
-
+
-
+
-
+
-
+
diff --git a/HandyControl/Controls/Picker/ColorPicker.xaml.cs b/HandyControl/Controls/Picker/ColorPicker.xaml.cs
index bdb86adb..396c48dd 100644
--- a/HandyControl/Controls/Picker/ColorPicker.xaml.cs
+++ b/HandyControl/Controls/Picker/ColorPicker.xaml.cs
@@ -8,6 +8,7 @@ using System.Windows.Media;
using HandyControl.Data;
using HandyControl.Tools.Extension;
+// ReSharper disable once CheckNamespace
namespace HandyControl.Controls
{
///
@@ -510,10 +511,10 @@ namespace HandyControl.Controls
private void ButtonSwitch_OnClick(object sender, RoutedEventArgs e) => ColorType++;
- private void InfoNumericUpDownRgb_OnValueChanged(object sender, FunctionEventArgs e)
+ private void NumericUpDownRgb_OnValueChanged(object sender, FunctionEventArgs e)
{
if (!_isLoaded || !IsNeedUpdateInfo) return;
- if (e.OriginalSource is InfoNumericUpDown ctl && ctl.Tag is string tag)
+ if (e.OriginalSource is NumericUpDown ctl && ctl.Tag is string tag)
{
var color = SelectedBrush.Color;
IsNeedUpdateInfo = false;
diff --git a/HandyControl/Controls/TimeBar/TimeBar.cs b/HandyControl/Controls/TimeBar/TimeBar.cs
index 6541c40b..83ba1e63 100644
--- a/HandyControl/Controls/TimeBar/TimeBar.cs
+++ b/HandyControl/Controls/TimeBar/TimeBar.cs
@@ -31,8 +31,7 @@ namespace HandyControl.Controls
private const string ElementCanvasSpe = "PART_CanvasSpe";
#endregion Constants
-
-
+
#region Data
private Border _borderTop;
diff --git a/HandyControl/Controls/Window/ImageBrowser.xaml.cs b/HandyControl/Controls/Window/ImageBrowser.cs
similarity index 73%
rename from HandyControl/Controls/Window/ImageBrowser.xaml.cs
rename to HandyControl/Controls/Window/ImageBrowser.cs
index 54b3ece3..e9d7ea85 100644
--- a/HandyControl/Controls/Window/ImageBrowser.xaml.cs
+++ b/HandyControl/Controls/Window/ImageBrowser.cs
@@ -2,10 +2,13 @@
using System.Diagnostics;
using System.IO;
using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Imaging;
+using HandyControl.Interactivity;
using HandyControl.Tools;
using Microsoft.Win32;
@@ -15,40 +18,87 @@ namespace HandyControl.Controls
///
/// 图片浏览器
///
- public partial class ImageBrowser
+ [TemplatePart(Name = ElementGridTop, Type = typeof(Grid))]
+ [TemplatePart(Name = ElementGridMain, Type = typeof(Grid))]
+ [TemplatePart(Name = ElementCanvasSmallImg, Type = typeof(Canvas))]
+ [TemplatePart(Name = ElementBorderMove, Type = typeof(Border))]
+ [TemplatePart(Name = ElementBorderBottom, Type = typeof(Border))]
+ [TemplatePart(Name = ElementImageMain, Type = typeof(Image))]
+ public class ImageBrowser : WindowBorderless
{
+ #region Constants
+
+ private const string ElementGridTop = "PART_GridTop";
+
+ private const string ElementGridMain = "PART_GridMain";
+
+ private const string ElementCanvasSmallImg = "PART_CanvasSmallImg";
+
+ private const string ElementBorderMove = "PART_BorderMove";
+
+ private const string ElementBorderBottom = "PART_BorderBottom";
+
+ private const string ElementImageMain = "PART_ImageMain";
+
///
/// 缩放比间隔
///
private const double ScaleInternal = 0.2;
+ #endregion Constants
+
+ #region Data
+
+ private Grid _gridTop;
+
+ private Grid _canvasMain;
+
+ private Canvas _canvasSmallImg;
+
+ private Border _borderMove;
+
+ private Border _borderBottom;
+
+ private Image _imageMain;
+
+ #endregion Data
+
static ImageBrowser()
{
IsFullScreenProperty.AddOwner(typeof(ImageBrowser), new PropertyMetadata(default(bool)));
}
- private static readonly DependencyProperty ImageSourceProperty = DependencyProperty.Register(
+ internal static readonly DependencyProperty ImageContentProperty = DependencyProperty.Register(
+ "ImageContent", typeof(object), typeof(ImageBrowser), new PropertyMetadata(default(object)));
+
+ internal object ImageContent
+ {
+ get => GetValue(ImageContentProperty);
+ set => SetValue(ImageContentProperty, value);
+ }
+
+ internal static readonly DependencyProperty ImageSourceProperty = DependencyProperty.Register(
"ImageSource", typeof(BitmapFrame), typeof(ImageBrowser), new PropertyMetadata(default(BitmapFrame)));
- private static readonly DependencyProperty ImageMarginProperty = DependencyProperty.Register(
+ internal static readonly DependencyProperty ImageMarginProperty = DependencyProperty.Register(
"ImageMargin", typeof(Thickness), typeof(ImageBrowser), new PropertyMetadata(default(Thickness)));
- private static readonly DependencyProperty ImageWidthProperty = DependencyProperty.Register(
+ internal static readonly DependencyProperty ImageWidthProperty = DependencyProperty.Register(
"ImageWidth", typeof(double), typeof(ImageBrowser), new PropertyMetadata(default(double)));
- private static readonly DependencyProperty ImageHeightProperty = DependencyProperty.Register(
+ internal static readonly DependencyProperty ImageHeightProperty = DependencyProperty.Register(
"ImageHeight", typeof(double), typeof(ImageBrowser), new PropertyMetadata(default(double)));
public static readonly DependencyProperty ImageScaleProperty = DependencyProperty.Register(
"ImageScale", typeof(double), typeof(ImageBrowser), new PropertyMetadata(1.0, OnImageScaleChanged));
- private static readonly DependencyProperty ScaleStrProperty = DependencyProperty.Register(
+ internal static readonly DependencyProperty ScaleStrProperty = DependencyProperty.Register(
"ScaleStr", typeof(string), typeof(ImageBrowser), new PropertyMetadata("100%"));
- private static readonly DependencyProperty ImageRotateProperty = DependencyProperty.Register(
+ internal static readonly DependencyProperty ImageRotateProperty = DependencyProperty.Register(
"ImageRotate", typeof(double), typeof(ImageBrowser), new PropertyMetadata(default(double)));
- private static readonly DependencyProperty ShowSmallImgProperty = DependencyProperty.Register(
+ internal static readonly DependencyProperty ShowSmallImgProperty = DependencyProperty.Register(
"ShowSmallImg", typeof(bool), typeof(ImageBrowser), new PropertyMetadata(false));
///
@@ -182,15 +232,22 @@ namespace HandyControl.Controls
///
private bool _isOblique;
- public ImageBrowser() => InitializeComponent();
-
- ///
- /// 带一个图片路径的构造函数
- ///
- ///
- public ImageBrowser(string path) : this(new Uri(path))
+ public ImageBrowser()
{
+ Loaded += ImageBrowser_OnLoaded;
+ CommandBindings.Add(new CommandBinding(ControlCommands.Close, ButtonClose_OnClick));
+ CommandBindings.Add(new CommandBinding(ControlCommands.Save, ButtonSave_OnClick));
+ CommandBindings.Add(new CommandBinding(ControlCommands.Open, ButtonWindowsOpen_OnClick));
+ CommandBindings.Add(new CommandBinding(ControlCommands.Restore, ButtonActual_OnClick));
+ CommandBindings.Add(new CommandBinding(ControlCommands.Reduce, ButtonReduce_OnClick));
+ CommandBindings.Add(new CommandBinding(ControlCommands.Enlarge, ButtonEnlarge_OnClick));
+ CommandBindings.Add(new CommandBinding(ControlCommands.RotateLeft, ButtonRotateLeft_OnClick));
+ CommandBindings.Add(new CommandBinding(ControlCommands.RotateRight, ButtonRotateRight_OnClick));
+
+ WindowStartupLocation = WindowStartupLocation.CenterScreen;
+ WindowStyle = WindowStyle.None;
+ AllowsTransparency = true;
}
///
@@ -215,25 +272,82 @@ namespace HandyControl.Controls
}
}
- private BitmapFrame ImageSource
+ ///
+ /// 带一个图片路径的构造函数
+ ///
+ ///
+ public ImageBrowser(string path) : this(new Uri(path))
+ {
+
+ }
+
+ public override void OnApplyTemplate()
+ {
+ if (_imageMain != null)
+ {
+ _imageMain.MouseLeftButtonDown -= ImageMain_OnMouseLeftButtonDown;
+ }
+
+ if (_gridTop != null)
+ {
+ _gridTop.MouseLeftButtonDown -= GridTop_OnMouseLeftButtonDown;
+ }
+
+ if (_canvasSmallImg != null)
+ {
+ _canvasSmallImg.MouseLeftButtonDown -= CanvasSmallImg_OnMouseLeftButtonDown;
+ _canvasSmallImg.MouseLeftButtonUp -= CanvasSmallImg_OnMouseLeftButtonUp;
+ _canvasSmallImg.MouseMove -= CanvasSmallImg_OnMouseMove;
+ _canvasSmallImg.MouseLeave -= CanvasSmallImg_OnMouseLeave;
+ }
+
+ base.OnApplyTemplate();
+
+ _gridTop = GetTemplateChild(ElementGridTop) as Grid;
+ _canvasMain = GetTemplateChild(ElementGridMain) as Grid;
+ _canvasSmallImg = GetTemplateChild(ElementCanvasSmallImg) as Canvas;
+ _borderMove = GetTemplateChild(ElementBorderMove) as Border;
+ _imageMain = GetTemplateChild(ElementImageMain) as Image;
+ _borderBottom = GetTemplateChild(ElementBorderBottom) as Border;
+
+ if (_imageMain != null)
+ {
+ _imageMain.MouseLeftButtonDown += ImageMain_OnMouseLeftButtonDown;
+ }
+
+ if (_gridTop != null)
+ {
+ _gridTop.MouseLeftButtonDown += GridTop_OnMouseLeftButtonDown;
+ }
+
+ if (_canvasSmallImg != null)
+ {
+ _canvasSmallImg.MouseLeftButtonDown += CanvasSmallImg_OnMouseLeftButtonDown;
+ _canvasSmallImg.MouseLeftButtonUp += CanvasSmallImg_OnMouseLeftButtonUp;
+ _canvasSmallImg.MouseMove += CanvasSmallImg_OnMouseMove;
+ _canvasSmallImg.MouseLeave += CanvasSmallImg_OnMouseLeave;
+ }
+ }
+
+ internal BitmapFrame ImageSource
{
get => (BitmapFrame)GetValue(ImageSourceProperty);
set => SetValue(ImageSourceProperty, value);
}
- private Thickness ImageMargin
+ internal Thickness ImageMargin
{
get => (Thickness)GetValue(ImageMarginProperty);
set => SetValue(ImageMarginProperty, value);
}
- private double ImageWidth
+ internal double ImageWidth
{
get => (double)GetValue(ImageWidthProperty);
set => SetValue(ImageWidthProperty, value);
}
- private double ImageHeight
+ internal double ImageHeight
{
get => (double)GetValue(ImageHeightProperty);
set => SetValue(ImageHeightProperty, value);
@@ -245,19 +359,19 @@ namespace HandyControl.Controls
set => SetValue(ImageScaleProperty, value);
}
- private string ScaleStr
+ internal string ScaleStr
{
get => (string)GetValue(ScaleStrProperty);
set => SetValue(ScaleStrProperty, value);
}
- private double ImageRotate
+ internal double ImageRotate
{
get => (double)GetValue(ImageRotateProperty);
set => SetValue(ImageRotateProperty, value);
}
- private bool ShowSmallImg
+ internal bool ShowSmallImg
{
get => (bool)GetValue(ShowSmallImgProperty);
set => SetValue(ShowSmallImgProperty, value);
@@ -282,7 +396,7 @@ namespace HandyControl.Controls
set
{
if (_showCloseButton == value) return;
- GridTop.BeginAnimation(OpacityProperty,
+ _gridTop.BeginAnimation(OpacityProperty,
value ? AnimationHelper.CreateAnimation(1, 100) : AnimationHelper.CreateAnimation(0, 400));
_showCloseButton = value;
}
@@ -297,7 +411,7 @@ namespace HandyControl.Controls
set
{
if (_showBorderBottom == value) return;
- BorderBottom.BeginAnimation(OpacityProperty,
+ _borderBottom?.BeginAnimation(OpacityProperty,
value ? AnimationHelper.CreateAnimation(1, 100) : AnimationHelper.CreateAnimation(0, 400));
_showBorderBottom = value;
}
@@ -359,7 +473,7 @@ namespace HandyControl.Controls
}
ImageMargin = new Thickness((ActualWidth - ImageWidth) / 2, (ActualHeight - ImageHeight) / 2, 0, 0);
- _imgActualScale = ImageScale;
+ _imgActualScale = 1;
_imgActualMargin = ImageMargin;
}
@@ -420,20 +534,16 @@ namespace HandyControl.Controls
}
}
- private void ButtonScreenChange_OnClick(object sender, RoutedEventArgs e) => WindowState = IsFullScreen ? WindowState.Maximized : WindowState.Normal;
+ //private void ButtonScreenChange_OnClick(object sender, RoutedEventArgs e) => WindowState = IsFullScreen ? WindowState.Maximized : WindowState.Normal;
private void ButtonClose_OnClick(object sender, RoutedEventArgs e) => Close();
- private void CanvasBack_OnMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
+ private void GridTop_OnMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
- try
+ if (e.LeftButton == MouseButtonState.Pressed)
{
DragMove();
}
- catch
- {
- // ignored
- }
}
protected override void OnMouseMove(MouseEventArgs e)
@@ -480,7 +590,7 @@ namespace HandyControl.Controls
}
else
{
- var right = Math.Abs(BorderMove.Width - CanvasSmallImg.ActualWidth + BorderMove.Margin.Left);
+ var right = Math.Abs(_borderMove.Width - _canvasSmallImg.ActualWidth + _borderMove.Margin.Left);
if (right < 0.001)
{
marginX = ActualWidth - ImageWidth;
@@ -497,7 +607,7 @@ namespace HandyControl.Controls
}
else
{
- var top = Math.Abs(BorderMove.Height - CanvasSmallImg.ActualHeight + BorderMove.Margin.Top);
+ var top = Math.Abs(_borderMove.Height - _canvasSmallImg.ActualHeight + _borderMove.Margin.Top);
if (top < 0.001)
{
marginY = ActualHeight - ImageHeight;
@@ -513,9 +623,8 @@ namespace HandyControl.Controls
{
base.OnMouseDoubleClick(e);
- if (e.GetPosition(GridTop).Y > GridTop.ActualHeight) return;
+ if (e.GetPosition(_gridTop).Y > _gridTop.ActualHeight) return;
IsFullScreen = !IsFullScreen;
- ButtonScreenChange_OnClick(null, null);
}
private void ImageBrowser_OnLoaded(object sender, RoutedEventArgs e)
@@ -532,7 +641,7 @@ namespace HandyControl.Controls
DragMove();
return;
}
- _imgMouseDownPoint = Mouse.GetPosition(CanvasMain);
+ _imgMouseDownPoint = Mouse.GetPosition(_canvasMain);
_imgMouseDownMargin = ImageMargin;
_imgIsMouseLeftButtonDown = true;
e.Handled = true;
@@ -553,7 +662,7 @@ namespace HandyControl.Controls
{
if (!_borderSmallIsLoaded)
{
- CanvasSmallImg.Background = new VisualBrush(ImageMain);
+ _canvasSmallImg.Background = new VisualBrush(_imageMain);
InitBorderSmall();
_borderSmallIsLoaded = true;
}
@@ -571,16 +680,16 @@ namespace HandyControl.Controls
///
private void InitBorderSmall()
{
- var scaleWindow = CanvasSmallImg.MaxWidth / CanvasSmallImg.MaxHeight;
+ var scaleWindow = _canvasSmallImg.MaxWidth / _canvasSmallImg.MaxHeight;
if (_imgWidHeiScale > scaleWindow)
{
- CanvasSmallImg.Width = CanvasSmallImg.MaxWidth;
- CanvasSmallImg.Height = CanvasSmallImg.Width / _imgWidHeiScale;
+ _canvasSmallImg.Width = _canvasSmallImg.MaxWidth;
+ _canvasSmallImg.Height = _canvasSmallImg.Width / _imgWidHeiScale;
}
else
{
- CanvasSmallImg.Width = CanvasSmallImg.MaxHeight * _imgWidHeiScale;
- CanvasSmallImg.Height = CanvasSmallImg.MaxHeight;
+ _canvasSmallImg.Width = _canvasSmallImg.MaxHeight * _imgWidHeiScale;
+ _canvasSmallImg.Height = _canvasSmallImg.MaxHeight;
}
}
@@ -594,21 +703,21 @@ namespace HandyControl.Controls
var widthMin = Math.Min(ImageWidth, ActualWidth);
var heightMin = Math.Min(ImageHeight, ActualHeight);
- BorderMove.Width = widthMin / ImageWidth * CanvasSmallImg.Width;
- BorderMove.Height = heightMin / ImageHeight * CanvasSmallImg.Height;
+ _borderMove.Width = widthMin / ImageWidth * _canvasSmallImg.Width;
+ _borderMove.Height = heightMin / ImageHeight * _canvasSmallImg.Height;
- var marginX = -ImageMargin.Left / ImageWidth * CanvasSmallImg.Width;
- var marginY = -ImageMargin.Top / ImageHeight * CanvasSmallImg.Height;
+ var marginX = -ImageMargin.Left / ImageWidth * _canvasSmallImg.Width;
+ var marginY = -ImageMargin.Top / ImageHeight * _canvasSmallImg.Height;
- var marginXMax = CanvasSmallImg.Width - BorderMove.Width;
- var marginYMax = CanvasSmallImg.Height - BorderMove.Height;
+ var marginXMax = _canvasSmallImg.Width - _borderMove.Width;
+ var marginYMax = _canvasSmallImg.Height - _borderMove.Height;
marginX = Math.Max(0, marginX);
marginX = Math.Min(marginXMax, marginX);
marginY = Math.Max(0, marginY);
marginY = Math.Min(marginYMax, marginY);
- BorderMove.Margin = new Thickness(marginX, marginY, 0, 0);
+ _borderMove.Margin = new Thickness(marginX, marginY, 0, 0);
}
///
@@ -627,7 +736,7 @@ namespace HandyControl.Controls
ImageScale = tempScale;
- var posCanvas = Mouse.GetPosition(CanvasMain);
+ var posCanvas = Mouse.GetPosition(_canvasMain);
var posImg = new Point(posCanvas.X - _imgActualMargin.Left, posCanvas.Y - _imgActualMargin.Top);
var marginX = .5 * _scaleInternalWidth;
@@ -665,15 +774,15 @@ namespace HandyControl.Controls
var subX = ImageWidth - ActualWidth;
var subY = ImageHeight - ActualHeight;
- var right = Math.Abs(BorderMove.Width - CanvasSmallImg.ActualWidth + BorderMove.Margin.Left);
- var top = Math.Abs(BorderMove.Height - CanvasSmallImg.ActualHeight + BorderMove.Margin.Top);
+ var right = Math.Abs(_borderMove.Width - _canvasSmallImg.ActualWidth + _borderMove.Margin.Left);
+ var top = Math.Abs(_borderMove.Height - _canvasSmallImg.ActualHeight + _borderMove.Margin.Top);
if (Math.Abs(ImageMargin.Left) < 0.001 || right < 0.001)
{
- marginActualX = _imgActualMargin.Left + BorderMove.Margin.Left / (CanvasSmallImg.ActualWidth - BorderMove.Width) * _scaleInternalWidth;
+ marginActualX = _imgActualMargin.Left + _borderMove.Margin.Left / (_canvasSmallImg.ActualWidth - _borderMove.Width) * _scaleInternalWidth;
}
if (Math.Abs(ImageMargin.Top) < 0.001 || top < 0.001)
{
- marginActualY = _imgActualMargin.Top + BorderMove.Margin.Top / (CanvasSmallImg.ActualHeight - BorderMove.Height) * _scaleInternalHeight;
+ marginActualY = _imgActualMargin.Top + _borderMove.Margin.Top / (_canvasSmallImg.ActualHeight - _borderMove.Height) * _scaleInternalHeight;
}
if (subX < 0.001)
{
@@ -716,7 +825,7 @@ namespace HandyControl.Controls
///
private void MoveImg()
{
- _imgCurrentPoint = Mouse.GetPosition(CanvasMain);
+ _imgCurrentPoint = Mouse.GetPosition(_canvasMain);
ShowCloseButton = _imgCurrentPoint.Y < 200;
ShowBorderBottom = _imgCurrentPoint.Y > ActualHeight - 200;
@@ -769,7 +878,7 @@ namespace HandyControl.Controls
{
if (_imgSmallIsMouseLeftButtonDown)
{
- _imgSmallCurrentPoint = Mouse.GetPosition(CanvasSmallImg);
+ _imgSmallCurrentPoint = Mouse.GetPosition(_canvasSmallImg);
var subX = _imgSmallCurrentPoint.X - _imgSmallMouseDownPoint.X;
var subY = _imgSmallCurrentPoint.Y - _imgSmallMouseDownPoint.Y;
@@ -779,9 +888,9 @@ namespace HandyControl.Controls
{
marginX = 0;
}
- else if (marginX + BorderMove.Width >= CanvasSmallImg.ActualWidth)
+ else if (marginX + _borderMove.Width >= _canvasSmallImg.ActualWidth)
{
- marginX = CanvasSmallImg.ActualWidth - BorderMove.Width;
+ marginX = _canvasSmallImg.ActualWidth - _borderMove.Width;
}
var marginY = _imgSmallMouseDownMargin.Top + subY;
@@ -789,22 +898,22 @@ namespace HandyControl.Controls
{
marginY = 0;
}
- else if (marginY + BorderMove.Height >= CanvasSmallImg.ActualHeight)
+ else if (marginY + _borderMove.Height >= _canvasSmallImg.ActualHeight)
{
- marginY = CanvasSmallImg.ActualHeight - BorderMove.Height;
+ marginY = _canvasSmallImg.ActualHeight - _borderMove.Height;
}
- BorderMove.Margin = new Thickness(marginX, marginY, 0, 0);
+ _borderMove.Margin = new Thickness(marginX, marginY, 0, 0);
var marginActualX = (ActualWidth - ImageWidth) / 2;
var marginActualY = (ActualHeight - ImageHeight) / 2;
if (_canMoveX)
{
- marginActualX = -marginX / CanvasSmallImg.ActualWidth * ImageWidth;
+ marginActualX = -marginX / _canvasSmallImg.ActualWidth * ImageWidth;
}
if (_canMoveY)
{
- marginActualY = -marginY / CanvasSmallImg.ActualHeight * ImageHeight;
+ marginActualY = -marginY / _canvasSmallImg.ActualHeight * ImageHeight;
}
ImageMargin = new Thickness(marginActualX, marginActualY, 0, 0);
@@ -814,8 +923,8 @@ namespace HandyControl.Controls
private void CanvasSmallImg_OnMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
- _imgSmallMouseDownPoint = Mouse.GetPosition(CanvasSmallImg);
- _imgSmallMouseDownMargin = BorderMove.Margin;
+ _imgSmallMouseDownPoint = Mouse.GetPosition(_canvasSmallImg);
+ _imgSmallMouseDownMargin = _borderMove.Margin;
_imgSmallIsMouseLeftButtonDown = true;
e.Handled = true;
}
diff --git a/HandyControl/Controls/Window/ImageBrowser.xaml b/HandyControl/Controls/Window/ImageBrowser.xaml
deleted file mode 100644
index b0e0ab84..00000000
--- a/HandyControl/Controls/Window/ImageBrowser.xaml
+++ /dev/null
@@ -1,81 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/HandyControl/HandyControl.csproj b/HandyControl/HandyControl.csproj
index 8e2d91c0..07607d04 100644
--- a/HandyControl/HandyControl.csproj
+++ b/HandyControl/HandyControl.csproj
@@ -47,6 +47,7 @@
+
ColorPicker.xaml
@@ -54,13 +55,6 @@
-
-
- InfoNumericUpDown.xaml
-
-
- InfoTextBox.xaml
-
@@ -74,9 +68,7 @@
-
- ImageBrowser.xaml
-
+
@@ -153,26 +145,11 @@
-
-
-
Designer
MSBuild:Compile
-
- Designer
- MSBuild:Compile
-
-
- Designer
- MSBuild:Compile
-
-
- Designer
- MSBuild:Compile
-
Designer
MSBuild:Compile
@@ -213,6 +190,10 @@
Designer
MSBuild:Compile
+
+ Designer
+ MSBuild:Compile
+
Designer
MSBuild:Compile
@@ -337,6 +318,10 @@
Designer
MSBuild:Compile
+
+ Designer
+ MSBuild:Compile
+
Designer
MSBuild:Compile
diff --git a/HandyControl/Interactivity/ControlCommands.cs b/HandyControl/Interactivity/ControlCommands.cs
index 2bb1b1cc..50c70f73 100644
--- a/HandyControl/Interactivity/ControlCommands.cs
+++ b/HandyControl/Interactivity/ControlCommands.cs
@@ -3,10 +3,45 @@
namespace HandyControl.Interactivity
{
///
- /// 控件库使用的所有命令
+ /// 控件库使用的所有命令(为了统一,不使用wpf自带的命令)
///
public static class ControlCommands
{
+ ///
+ /// 右转
+ ///
+ public static RoutedCommand RotateRight { get; } = new RoutedCommand("RotateRight", typeof(ControlCommands));
+
+ ///
+ /// 左转
+ ///
+ public static RoutedCommand RotateLeft { get; } = new RoutedCommand("RotateLeft", typeof(ControlCommands));
+
+ ///
+ /// 小
+ ///
+ public static RoutedCommand Reduce { get; } = new RoutedCommand("Reduce", typeof(ControlCommands));
+
+ ///
+ /// 大
+ ///
+ public static RoutedCommand Enlarge { get; } = new RoutedCommand("Enlarge", typeof(ControlCommands));
+
+ ///
+ /// 还原
+ ///
+ public static RoutedCommand Restore { get; } = new RoutedCommand("Restore", typeof(ControlCommands));
+
+ ///
+ /// 打开
+ ///
+ public static RoutedCommand Open { get; } = new RoutedCommand("Open", typeof(ControlCommands));
+
+ ///
+ /// 保存
+ ///
+ public static RoutedCommand Save { get; } = new RoutedCommand("Save", typeof(ControlCommands));
+
///
/// 选中
///
diff --git a/HandyControl/Properties/AssemblyInfo.cs b/HandyControl/Properties/AssemblyInfo.cs
index 59ab3326..8399a9fa 100644
--- a/HandyControl/Properties/AssemblyInfo.cs
+++ b/HandyControl/Properties/AssemblyInfo.cs
@@ -10,5 +10,5 @@ using System.Runtime.InteropServices;
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
-[assembly: AssemblyVersion("1.3.2.2")]
-[assembly: AssemblyFileVersion("1.3.2.2")]
+[assembly: AssemblyVersion("1.3.3")]
+[assembly: AssemblyFileVersion("1.3.3")]
diff --git a/HandyControl/Resources/colorPickerBack.png b/HandyControl/Resources/colorPickerBack.png
deleted file mode 100644
index 770865e9547abe10771b6b18121fed173f904860..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 34435
zcmeFY2T)YY_UJvN0fwA24nxj4N@mC)1Cmu_$T=f9XCzA!C4=N386@W@pdct&qDYPc
zqThJVx#x1vJ@m`8b9vf3
zA+!MiaVbwHxT&qV8`#9$(%L}+vj3_B0=71jfanRT^Qb$?nOj*adApe3^}eHR>TPQ(
zY6g*#1c`f!AspD7yTQSp_I3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DM5#`aBvp>UM0(C_jD=TI}4{L9IT#%(X){H%6D?%8GTu6wUqL1
zF7ZNMatWc$3_XL-C&d1hJmGBVFu4fdU%uz7-~WN!YnrcKKn?W|9$)^zIqbp&WPb!B
zxQJBSi6^^~Z@%Xl&W?2|UQZhr|1F00o_$Z$Gw<@$@BQo_k#bxx`oH(_FXw@OD=qc+
wc$R
-
diff --git a/HandyControl/Themes/Styles/Base/DatePickerBaseStyle.xaml b/HandyControl/Themes/Styles/Base/DatePickerBaseStyle.xaml
index 48ef45a7..be2295c7 100644
--- a/HandyControl/Themes/Styles/Base/DatePickerBaseStyle.xaml
+++ b/HandyControl/Themes/Styles/Base/DatePickerBaseStyle.xaml
@@ -34,7 +34,6 @@
-
diff --git a/HandyControl/Themes/Styles/Base/NumericUpDownBaseStyle.xaml b/HandyControl/Themes/Styles/Base/NumericUpDownBaseStyle.xaml
new file mode 100644
index 00000000..42a61e02
--- /dev/null
+++ b/HandyControl/Themes/Styles/Base/NumericUpDownBaseStyle.xaml
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HandyControl/Themes/Styles/Base/PasswordBoxBaseStyle.xaml b/HandyControl/Themes/Styles/Base/PasswordBoxBaseStyle.xaml
index bc102f40..7e9841f8 100644
--- a/HandyControl/Themes/Styles/Base/PasswordBoxBaseStyle.xaml
+++ b/HandyControl/Themes/Styles/Base/PasswordBoxBaseStyle.xaml
@@ -13,7 +13,6 @@
-
diff --git a/HandyControl/Themes/Styles/Base/TextBoxBaseStyle.xaml b/HandyControl/Themes/Styles/Base/TextBoxBaseStyle.xaml
index e7d40ae3..492c7634 100644
--- a/HandyControl/Themes/Styles/Base/TextBoxBaseStyle.xaml
+++ b/HandyControl/Themes/Styles/Base/TextBoxBaseStyle.xaml
@@ -36,7 +36,6 @@
-
diff --git a/HandyControl/Themes/Styles/Base/TimePickerBaseStyle.xaml b/HandyControl/Themes/Styles/Base/TimePickerBaseStyle.xaml
index 0249997e..d98952de 100644
--- a/HandyControl/Themes/Styles/Base/TimePickerBaseStyle.xaml
+++ b/HandyControl/Themes/Styles/Base/TimePickerBaseStyle.xaml
@@ -12,7 +12,6 @@
-
diff --git a/HandyControl/Themes/Styles/Base/ToggleButtonBaseStyle.xaml b/HandyControl/Themes/Styles/Base/ToggleButtonBaseStyle.xaml
index 33e3c5d8..01f0498b 100644
--- a/HandyControl/Themes/Styles/Base/ToggleButtonBaseStyle.xaml
+++ b/HandyControl/Themes/Styles/Base/ToggleButtonBaseStyle.xaml
@@ -14,9 +14,6 @@
-
diff --git a/HandyControl/Themes/Styles/Border.xaml b/HandyControl/Themes/Styles/Border.xaml
index 174be80e..cb6ea280 100644
--- a/HandyControl/Themes/Styles/Border.xaml
+++ b/HandyControl/Themes/Styles/Border.xaml
@@ -9,13 +9,13 @@
-
-
+
+
\ No newline at end of file
diff --git a/HandyControlDemo/Data/MessageToken.cs b/HandyControlDemo/Data/MessageToken.cs
index 6be64883..185d6790 100644
--- a/HandyControlDemo/Data/MessageToken.cs
+++ b/HandyControlDemo/Data/MessageToken.cs
@@ -28,6 +28,8 @@
public static readonly string CirclePanelDemoCtl = nameof(CirclePanelDemoCtl);
+ public static readonly string NumericUpDownDemoCtl = nameof(NumericUpDownDemoCtl);
+
public static readonly string ButtonDemoCtl = nameof(ButtonDemoCtl);
public static readonly string ToggleButtonDemoCtl = nameof(ToggleButtonDemoCtl);
diff --git a/HandyControlDemo/Data/MessageToken.tt b/HandyControlDemo/Data/MessageToken.tt
index cc7d34cd..d7a2467e 100644
--- a/HandyControlDemo/Data/MessageToken.tt
+++ b/HandyControlDemo/Data/MessageToken.tt
@@ -16,7 +16,8 @@ var controlList = new List
"StepBarDemoCtl",
"ClockDemoCtl",
"TimePickerDemoCtl",
- "CirclePanelDemoCtl"
+ "CirclePanelDemoCtl",
+ "NumericUpDownDemoCtl"
};
var styleList = new List
{
diff --git a/HandyControlDemo/HandyControlDemo.csproj b/HandyControlDemo/HandyControlDemo.csproj
index 8f28510d..8095c7b9 100644
--- a/HandyControlDemo/HandyControlDemo.csproj
+++ b/HandyControlDemo/HandyControlDemo.csproj
@@ -106,6 +106,9 @@
LoadingDemoCtl.xaml
+
+ NumericUpDownDemoCtl.xaml
+
StepBarDemoCtl.xaml
@@ -248,6 +251,10 @@
Designer
MSBuild:Compile
+
+ Designer
+ MSBuild:Compile
+
Designer
MSBuild:Compile
diff --git a/HandyControlDemo/Properties/AssemblyInfo.cs b/HandyControlDemo/Properties/AssemblyInfo.cs
index 1e33adb5..db61bf36 100644
--- a/HandyControlDemo/Properties/AssemblyInfo.cs
+++ b/HandyControlDemo/Properties/AssemblyInfo.cs
@@ -12,5 +12,5 @@ using System.Windows;
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)]
-[assembly: AssemblyVersion("1.3.2.2")]
-[assembly: AssemblyFileVersion("1.3.2.2")]
+[assembly: AssemblyVersion("1.3.3")]
+[assembly: AssemblyFileVersion("1.3.3")]
diff --git a/HandyControlDemo/Properties/Langs/Lang.Designer.cs b/HandyControlDemo/Properties/Langs/Lang.Designer.cs
index 91f27645..a106e2e9 100644
--- a/HandyControlDemo/Properties/Langs/Lang.Designer.cs
+++ b/HandyControlDemo/Properties/Langs/Lang.Designer.cs
@@ -330,6 +330,15 @@ namespace HandyControlDemo.Properties.Langs {
}
}
+ ///
+ /// 查找类似 数值选择控件 的本地化字符串。
+ ///
+ public static string NumericUpDown {
+ get {
+ return ResourceManager.GetString("NumericUpDown", resourceCulture);
+ }
+ }
+
///
/// 查找类似 点击打开图片浏览器 的本地化字符串。
///
diff --git a/HandyControlDemo/Properties/Langs/Lang.en.resx b/HandyControlDemo/Properties/Langs/Lang.en.resx
index 741cf0ce..456eadb3 100644
--- a/HandyControlDemo/Properties/Langs/Lang.en.resx
+++ b/HandyControlDemo/Properties/Langs/Lang.en.resx
@@ -282,4 +282,7 @@
ComboBox
+
+ NumericUpDown
+
\ No newline at end of file
diff --git a/HandyControlDemo/Properties/Langs/Lang.resx b/HandyControlDemo/Properties/Langs/Lang.resx
index b5a6042d..4956b5ff 100644
--- a/HandyControlDemo/Properties/Langs/Lang.resx
+++ b/HandyControlDemo/Properties/Langs/Lang.resx
@@ -262,4 +262,7 @@
组合框
+
+ 数值选择控件
+
\ No newline at end of file
diff --git a/HandyControlDemo/UserControl/Controls/NumericUpDownDemoCtl.xaml b/HandyControlDemo/UserControl/Controls/NumericUpDownDemoCtl.xaml
new file mode 100644
index 00000000..1e48e96e
--- /dev/null
+++ b/HandyControlDemo/UserControl/Controls/NumericUpDownDemoCtl.xaml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
diff --git a/HandyControlDemo/UserControl/Controls/NumericUpDownDemoCtl.xaml.cs b/HandyControlDemo/UserControl/Controls/NumericUpDownDemoCtl.xaml.cs
new file mode 100644
index 00000000..e09320bb
--- /dev/null
+++ b/HandyControlDemo/UserControl/Controls/NumericUpDownDemoCtl.xaml.cs
@@ -0,0 +1,11 @@
+// ReSharper disable once CheckNamespace
+namespace HandyControlDemo.UserControl
+{
+ public partial class NumericUpDownDemoCtl
+ {
+ public NumericUpDownDemoCtl()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/HandyControlDemo/UserControl/Main/LeftMainContent.xaml b/HandyControlDemo/UserControl/Main/LeftMainContent.xaml
index f2ef5904..cc126180 100644
--- a/HandyControlDemo/UserControl/Main/LeftMainContent.xaml
+++ b/HandyControlDemo/UserControl/Main/LeftMainContent.xaml
@@ -25,11 +25,12 @@
-
+
+
@@ -47,40 +48,4 @@
-
\ No newline at end of file