Files
Shrlalgo.RvKits/WPFDark/StandardControls/TabControlAttachedProperties.cs
ShrlAlgo 4d35cadb56 更新
2025-07-11 09:20:23 +08:00

61 lines
2.0 KiB
C#

using System.Windows;
using System.Windows.Input;
namespace WPFDark.StandardControls
{
public class TabControlAttachedProperties
{
public static readonly DependencyProperty IsVisibleAddButtonProperty =
DependencyProperty.RegisterAttached(
"IsVisibleAddButton",
typeof(bool),
typeof(TabControlAttachedProperties),
new FrameworkPropertyMetadata(false));
public static bool GetIsVisibleAddButton(DependencyObject target)
{
return (bool) target.GetValue(IsVisibleAddButtonProperty);
}
public static void SetIsVisibleAddButton(DependencyObject target, bool value)
{
target.SetValue(IsVisibleAddButtonProperty, value);
}
public static readonly DependencyProperty AddCommandProperty =
DependencyProperty.RegisterAttached(
"AddCommand",
typeof(ICommand),
typeof(TabControlAttachedProperties),
new FrameworkPropertyMetadata(null));
public static ICommand GetAddCommand(DependencyObject target)
{
return (ICommand) target.GetValue(AddCommandProperty);
}
public static void SetAddCommand(DependencyObject target, ICommand value)
{
target.SetValue(AddCommandProperty, value);
}
public static readonly DependencyProperty AddCommandParameterProperty =
DependencyProperty.RegisterAttached(
"AddCommandParameter",
typeof(object),
typeof(TabControlAttachedProperties),
new FrameworkPropertyMetadata(null));
public static object GetAddCommandParameter(DependencyObject target)
{
return target.GetValue(AddCommandParameterProperty);
}
public static void SetAddCommandParameter(DependencyObject target, object value)
{
target.SetValue(AddCommandParameterProperty, value);
}
}
}