public ExpandoValueProvider(DependencyObject target, string propertyName) : base(ValueProviderOptions.LongLife) { _target = target; _property = DependencyPropertyManager.GetExpandoProperty(propertyName); }
public static object GetExpandoValue(this DependencyObject depObj, string propertyName) { return(depObj.GetValue(DependencyPropertyManager.GetExpandoProperty(propertyName))); }
public static void SetExpandoValue(this DependencyObject depObj, string propertyName, object value) { depObj.SetValue(DependencyPropertyManager.GetExpandoProperty(propertyName), value); }
public static void SetExpandoBinding(this DependencyObject depObj, string propertyName, Binding binding) { BindingOperations.SetBinding(depObj, DependencyPropertyManager.GetExpandoProperty(propertyName), binding); }
static RoutedEventCommandHelper() { CommandProperty = DependencyPropertyManager.Register("Command", typeof(ICommand), typeof(RoutedEventCommandHelper), new PropertyMetadata(null)); }
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); }