Пример #1
0
 public ExpandoValueProvider(DependencyObject target, string propertyName) : base(ValueProviderOptions.LongLife)
 {
     _target   = target;
     _property = DependencyPropertyManager.GetExpandoProperty(propertyName);
 }
Пример #2
0
 public static object GetExpandoValue(this DependencyObject depObj, string propertyName)
 {
     return(depObj.GetValue(DependencyPropertyManager.GetExpandoProperty(propertyName)));
 }
Пример #3
0
 public static void SetExpandoValue(this DependencyObject depObj, string propertyName, object value)
 {
     depObj.SetValue(DependencyPropertyManager.GetExpandoProperty(propertyName), value);
 }
Пример #4
0
 public static void SetExpandoBinding(this DependencyObject depObj, string propertyName, Binding binding)
 {
     BindingOperations.SetBinding(depObj, DependencyPropertyManager.GetExpandoProperty(propertyName), binding);
 }
Пример #5
0
 static RoutedEventCommandHelper()
 {
     CommandProperty = DependencyPropertyManager.Register("Command", typeof(ICommand), typeof(RoutedEventCommandHelper), new PropertyMetadata(null));
 }
Пример #6
0
 static DemoRichEditBox()
 {
     RTFTextProperty     = DependencyPropertyManager.Register <DemoRichEditBox, string>("RTFText", null, (d, e) => d.OnRtfTextChanged());
     FileNameProperty    = DependencyPropertyManager.Register <DemoRichEditBox, string>("FileName", string.Empty);
     InitialTextProperty = DependencyPropertyManager.Register <DemoRichEditBox, string>(nameof(InitialText), null);
 }