using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using FWindSoft.Wpf.Controls; namespace Test { public class ElementCopyOptions { /// /// 是否使用复制值 /// public static readonly DependencyProperty UseCopyProperty = DependencyProperty.RegisterAttached("UseCopy", typeof(bool), typeof(ElementCopyOptions), new PropertyMetadata(false, null)); public static bool GetUseCopy(DependencyObject obj) { return (bool)obj.GetValue(UseCopyProperty); } public static void SetUseCopy(DependencyObject obj, object value) { obj.SetValue(UseCopyProperty, value); } /// /// 复制的值信息 /// public static readonly DependencyProperty CopyValueProperty = DependencyProperty.RegisterAttached("CopyValue", typeof(object), typeof(ElementCopyOptions), new PropertyMetadata(null, null)); public static object GetCopyValue(DependencyObject obj) { return (object)obj.GetValue(CopyValueProperty); } public static void SetCopyValue(DependencyObject obj, object value) { obj.SetValue(CopyValueProperty, value); } } }