优化更新代码,添加界面功能并整合

This commit is contained in:
GG Z
2025-02-10 20:53:40 +08:00
parent 83b846f15f
commit 978e03a67f
1389 changed files with 95739 additions and 22200 deletions

View File

@@ -0,0 +1,40 @@
namespace WPFluent.Controls;
/// <summary>
/// Use <see cref="ToggleSwitch"/> to present users with two mutally exclusive options (like on/off).
/// </summary>
public class ToggleSwitch : System.Windows.Controls.Primitives.ToggleButton
{
/// <summary>
/// Identifies the <see cref="OffContent"/> dependency property.
/// </summary>
public static readonly DependencyProperty OffContentProperty = DependencyProperty.Register(
nameof(OffContent),
typeof(object),
typeof(ToggleSwitch),
new PropertyMetadata(null));
/// <summary>
/// Identifies the <see cref="OnContent"/> dependency property.
/// </summary>
public static readonly DependencyProperty OnContentProperty = DependencyProperty.Register(
nameof(OnContent),
typeof(object),
typeof(ToggleSwitch),
new PropertyMetadata(null));
/// <summary>
/// Gets or sets the content that should be displayed when the <see cref="ToggleSwitch"/> is in the "Off" state.
/// </summary>
[Bindable(true)]
public object OffContent { get => GetValue(OffContentProperty); set => SetValue(OffContentProperty, value); }
/// <summary>
/// Gets or sets the content that should be displayed when the <see cref="ToggleSwitch"/> is in the "On" state.
/// </summary>
[Bindable(true)]
public object OnContent { get => GetValue(OnContentProperty); set => SetValue(OnContentProperty, value); }
}