diff --git a/HandyControl/Controls/Input/PasswordBox.cs b/HandyControl/Controls/Input/PasswordBox.cs
index 8d7708e2..2bb0c38f 100644
--- a/HandyControl/Controls/Input/PasswordBox.cs
+++ b/HandyControl/Controls/Input/PasswordBox.cs
@@ -165,9 +165,6 @@ namespace HandyControl.Controls
- private void PasswordBox_PasswordChanged(object sender, RoutedEventArgs e)
- {
- VerifyData();
- }
+ private void PasswordBox_PasswordChanged(object sender, RoutedEventArgs e) => VerifyData();
}
}
\ No newline at end of file
diff --git a/HandyControl/Controls/Input/WatermarkTextBox.cs b/HandyControl/Controls/Input/WatermarkTextBox.cs
index 56586688..dbdf51bb 100644
--- a/HandyControl/Controls/Input/WatermarkTextBox.cs
+++ b/HandyControl/Controls/Input/WatermarkTextBox.cs
@@ -1,36 +1,15 @@
using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
namespace HandyControl.Controls
{
- [TemplatePart(Name = ElementContentName, Type = typeof(ContentControl))]
- public class WatermarkTextBox : TextBox
+ internal class WatermarkTextBox : TextBox
{
- #region Constants
-
- private const string ElementContentName = "PART_Watermark";
-
- #endregion Constants
-
- #region Data
-
- private ContentControl _elementContent;
-
- #endregion Data
-
#region Public Properties
#region Watermark
public static readonly DependencyProperty WatermarkProperty = DependencyProperty.Register(
- "Watermark", typeof(object), typeof(WatermarkTextBox), new PropertyMetadata(default(object), OnWatermarkChanged));
-
- private static void OnWatermarkChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
- {
- var ctl = (WatermarkTextBox) d;
- ctl.OnWatermarkChanged();
- }
+ "Watermark", typeof(object), typeof(WatermarkTextBox), new PropertyMetadata(default(object)));
public object Watermark
{
@@ -42,26 +21,6 @@ namespace HandyControl.Controls
#endregion Public Properties
- public override void OnApplyTemplate()
- {
- base.OnApplyTemplate();
-
- _elementContent = GetTemplateChild(ElementContentName) as ContentControl;
- _elementContent?.SetBinding(ContentControl.ContentProperty, new Binding(WatermarkProperty.Name) {Source = this});
-
- OnWatermarkChanged();
- }
-
- private void OnWatermarkChanged()
- {
- if (_elementContent == null) return;
- if (Watermark is Control watermarkControl)
- {
- watermarkControl.IsTabStop = false;
- watermarkControl.IsHitTestVisible = false;
- }
- }
-
protected override void OnGotFocus(RoutedEventArgs e)
{
base.OnGotFocus(e);
diff --git a/HandyControl/Controls/Slider/CompareSlider.cs b/HandyControl/Controls/Slider/CompareSlider.cs
index 07bd98af..23ff9a43 100644
--- a/HandyControl/Controls/Slider/CompareSlider.cs
+++ b/HandyControl/Controls/Slider/CompareSlider.cs
@@ -22,38 +22,6 @@ namespace HandyControl.Controls
{
get => GetValue(SourceContentProperty);
set => SetValue(SourceContentProperty, value);
- }
-
- //private bool _isLoaded;
-
- //private double _tempValue;
-
- //public CompareSlider()
- //{
- // //Loaded += delegate
- // //{
- // // if (_isLoaded) return;
- // // _isLoaded = true;
- // // Value = _tempValue;
- // //};
- //}
-
- ////protected override void OnRender(DrawingContext drawingContext)
- ////{
- //// base.OnRender(drawingContext);
-
- //// Value = _tempValue;
- ////}
-
- ////public override void OnApplyTemplate()
- ////{
- //// base.OnApplyTemplate();
- //// _tempValue = Value;
- //// Value = Orientation == Orientation.Horizontal ? Maximum : 0;
- //// if (_isLoaded)
- //// {
- //// Value = _tempValue;
- //// }
- ////}
+ }
}
}
\ No newline at end of file
diff --git a/HandyControl/Themes/Basic/Sizes.xaml b/HandyControl/Themes/Basic/Sizes.xaml
index 03923c22..0d88fc35 100644
--- a/HandyControl/Themes/Basic/Sizes.xaml
+++ b/HandyControl/Themes/Basic/Sizes.xaml
@@ -4,5 +4,7 @@
30
12,6
+ 8,6
+ 4
\ No newline at end of file
diff --git a/HandyControl/Themes/Styles/Base/ComboBoxBaseStyle.xaml b/HandyControl/Themes/Styles/Base/ComboBoxBaseStyle.xaml
index b2b2c7b0..90d37234 100644
--- a/HandyControl/Themes/Styles/Base/ComboBoxBaseStyle.xaml
+++ b/HandyControl/Themes/Styles/Base/ComboBoxBaseStyle.xaml
@@ -20,9 +20,9 @@
-
-
-
+
+
+
@@ -53,9 +53,9 @@
-
-
-
+
+
+
@@ -82,11 +82,11 @@
-
-
@@ -145,11 +145,11 @@
-
-
+
+
-
+
@@ -199,18 +199,18 @@
-
+
-
-
+
+
-
+
@@ -281,17 +281,17 @@
-
-
+
+
-
+
-
+
@@ -347,11 +347,11 @@
-
-
+
+
-
+
@@ -404,18 +404,18 @@
-
+
-
-
+
+
-
+
@@ -505,17 +505,17 @@
-
+
-
+
-
+
@@ -531,7 +531,7 @@
-
+
@@ -561,10 +561,10 @@
-
+
-
+
@@ -583,16 +583,16 @@
-
-
+
+
-
+
-
+
@@ -665,10 +665,10 @@
-
+
-
+
@@ -677,23 +677,23 @@
-
+
-
-
+
+
-
+
-
+
@@ -766,10 +766,10 @@
-
+
-
+
@@ -788,16 +788,16 @@
-
-
+
+
-
+
-
+
@@ -891,10 +891,10 @@
-
+
-
+
@@ -903,23 +903,23 @@
-
+
-
-
+
+
-
+
-
+
diff --git a/HandyControl/Themes/Styles/Base/DatePickerBaseStyle.xaml b/HandyControl/Themes/Styles/Base/DatePickerBaseStyle.xaml
index 7fc69e40..1acbe669 100644
--- a/HandyControl/Themes/Styles/Base/DatePickerBaseStyle.xaml
+++ b/HandyControl/Themes/Styles/Base/DatePickerBaseStyle.xaml
@@ -16,10 +16,9 @@
-
-
-
-
+
+
+
@@ -29,13 +28,13 @@