整合自定义控件

This commit is contained in:
GG Z
2025-08-12 23:08:54 +08:00
parent f209e7d3ad
commit d0cfc64450
520 changed files with 30954 additions and 38968 deletions

View File

@@ -6,7 +6,6 @@ using System.Windows.Automation;
using System.Windows.Automation.Peers;
using WPFluent.Controls;
namespace WPFluent.Controls;

View File

@@ -13,8 +13,8 @@ public class ChooseBox : System.Windows.Controls.TextBox
public string PlaceholderText
{
get { return (string)GetValue(PlaceholderTextProperty); }
set { SetValue(PlaceholderTextProperty, value); }
get => (string)GetValue(PlaceholderTextProperty);
set => SetValue(PlaceholderTextProperty, value);
}
public static readonly DependencyProperty PlaceholderTextProperty =
@@ -93,8 +93,8 @@ public class ChooseBox : System.Windows.Controls.TextBox
/// </summary>
public Style ChooseButtonStyle
{
get { return (Style)GetValue(ChooseButtonStyleProperty); }
set { SetValue(ChooseButtonStyleProperty, value); }
get => (Style)GetValue(ChooseButtonStyleProperty);
set => SetValue(ChooseButtonStyleProperty, value);
}
public static readonly DependencyProperty ChooseButtonStyleProperty = DependencyProperty.Register(
@@ -106,8 +106,8 @@ public class ChooseBox : System.Windows.Controls.TextBox
#region ChooseBoxType
public ChooseType ChooseType
{
get { return (ChooseType)GetValue(ChooseTypeProperty); }
set { SetValue(ChooseTypeProperty, value); }
get => (ChooseType)GetValue(ChooseTypeProperty);
set => SetValue(ChooseTypeProperty, value);
}
public static readonly DependencyProperty ChooseTypeProperty = DependencyProperty.Register(
@@ -142,8 +142,8 @@ public class ChooseBox : System.Windows.Controls.TextBox
#region ChooseButtonWidth
public double ChooseButtonWidth
{
get { return (double)GetValue(ChooseButtonWidthProperty); }
set { SetValue(ChooseButtonWidthProperty, value); }
get => (double)GetValue(ChooseButtonWidthProperty);
set => SetValue(ChooseButtonWidthProperty, value);
}
public static readonly DependencyProperty ChooseButtonWidthProperty = DependencyProperty.Register(
@@ -154,7 +154,9 @@ public class ChooseBox : System.Windows.Controls.TextBox
#endregion
#region ChooseBoxFilter
public string Filter { get { return (string)GetValue(FilterProperty); } set { SetValue(FilterProperty, value); } }
public string Filter { get => (string)GetValue(FilterProperty);
set => SetValue(FilterProperty, value);
}
public static readonly DependencyProperty FilterProperty = DependencyProperty.Register(
nameof(Filter),
@@ -166,8 +168,8 @@ public class ChooseBox : System.Windows.Controls.TextBox
#region DefaultFileName
public string DefaultFileName
{
get { return (string)GetValue(DefaultFileNameProperty); }
set { SetValue(DefaultFileNameProperty, value); }
get => (string)GetValue(DefaultFileNameProperty);
set => SetValue(DefaultFileNameProperty, value);
}
public static readonly DependencyProperty DefaultFileNameProperty = DependencyProperty.Register(
@@ -180,8 +182,8 @@ public class ChooseBox : System.Windows.Controls.TextBox
#region DefaultExt
public string DefaultExt
{
get { return (string)GetValue(DefaultExtProperty); }
set { SetValue(DefaultExtProperty, value); }
get => (string)GetValue(DefaultExtProperty);
set => SetValue(DefaultExtProperty, value);
}
public static readonly DependencyProperty DefaultExtProperty = DependencyProperty.Register(

View File

@@ -8,7 +8,6 @@ using System.Windows;
using System.Windows.Media;
using System.Windows.Threading;
using WPFluent.Controls;
using MessageBoxButton = System.Windows.MessageBoxButton;
using MessageBoxResult = System.Windows.MessageBoxResult;

View File

@@ -1,5 +1,4 @@
using WPFluent.Controls;
using System;
using System.Globalization;

View File

@@ -372,18 +372,6 @@ public partial class NumberBox : TextBox
_valueUpdating = false;
}
/*/// <inheritdoc />
protected override void OnTextChanged(System.Windows.Controls.TextChangedEventArgs e)
{
base.OnTextChanged(e);
//if (new string[] { ",", ".", " " }.Any(s => Text.EndsWith(s)))
// return;
//if (!_textUpdating)
// UpdateValueToText();
}*/
/// <inheritdoc/>
public override void OnApplyTemplate()
{