12345678910111213141516171819202122232425262728293031323334353637383940 |
- 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
- {
- /// <summary>
- /// 是否使用复制值
- /// </summary>
- 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);
- }
- /// <summary>
- /// 复制的值信息
- /// </summary>
- 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);
- }
- }
- }
|