using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows;
|
|
|
|
namespace B3DealerClient.Utils
|
|
{
|
|
public static class ControlAttachProperty
|
|
{
|
|
#region IconSizeProperty 字体图标大小
|
|
/// <summary>
|
|
/// 字体图标
|
|
/// </summary>
|
|
public static readonly DependencyProperty IconSizeProperty = DependencyProperty.RegisterAttached(
|
|
"IconSize", typeof(double), typeof(ControlAttachProperty), new FrameworkPropertyMetadata(12D));
|
|
|
|
public static double GetIconSize(DependencyObject d)
|
|
{
|
|
return (double)d.GetValue(IconSizeProperty);
|
|
}
|
|
|
|
public static void SetIconSize(DependencyObject obj, double value)
|
|
{
|
|
obj.SetValue(IconSizeProperty, value);
|
|
}
|
|
#endregion
|
|
|
|
#region IconMarginProperty 字体图标边距
|
|
/// <summary>
|
|
/// 字体图标
|
|
/// </summary>
|
|
public static readonly DependencyProperty IconMarginProperty = DependencyProperty.RegisterAttached(
|
|
"IconMargin", typeof(Thickness), typeof(ControlAttachProperty), new FrameworkPropertyMetadata(null));
|
|
|
|
public static Thickness GetIconMargin(DependencyObject d)
|
|
{
|
|
return (Thickness)d.GetValue(IconMarginProperty);
|
|
}
|
|
|
|
public static void SetIconMargin(DependencyObject obj, Thickness value)
|
|
{
|
|
obj.SetValue(IconMarginProperty, value);
|
|
}
|
|
#endregion
|
|
|
|
#region IsNumberPad 字体图标边距
|
|
/// <summary>
|
|
/// 字体图标
|
|
/// </summary>
|
|
public static readonly DependencyProperty IsNumberPadProperty = DependencyProperty.RegisterAttached(
|
|
"IsNumberPad", typeof(bool), typeof(ControlAttachProperty), new FrameworkPropertyMetadata(true));
|
|
|
|
public static bool GetIsNumberPad(DependencyObject d)
|
|
{
|
|
return (bool)d.GetValue(IsNumberPadProperty);
|
|
}
|
|
|
|
public static void SetIsNumberPad(DependencyObject obj, bool value)
|
|
{
|
|
obj.SetValue(IsNumberPadProperty, value);
|
|
}
|
|
#endregion
|
|
}
|
|
}
|