/// <summary> /// Gets the extension collection which modifies a binding. /// </summary> /// <param name="obj">The element from which the property value is read.</param> /// <returns>The DW.WPFToolkit.Helpers.BindingAdapter.BindingExtensions property value for the element.</returns> public static BindingExtensionCollection GetBindingExtensions(DependencyObject obj) { var extension = (BindingExtensionCollection)obj.GetValue(BindingExtensionsProperty); if (extension == null) { var extensionsCollection = new BindingExtensionCollection(); obj.SetValue(BindingExtensionsProperty, extensionsCollection); } return(extension); }
/// <summary> /// Gets the extension collection which modifies a binding. /// </summary> /// <param name="obj">The element from which the property value is read.</param> /// <returns>The DW.WPFToolkit.Helpers.BindingAdapter.BindingExtensions property value for the element.</returns> public static BindingExtensionCollection GetBindingExtensions(DependencyObject obj) { var extension = (BindingExtensionCollection)obj.GetValue(BindingExtensionsProperty); if (extension == null) { var extensionsCollection = new BindingExtensionCollection(); obj.SetValue(BindingExtensionsProperty, extensionsCollection); } return extension; }
/// <summary> /// Sets the extensions collection which modifies a binding. /// </summary> /// <param name="obj">The element to which the attached property is written.</param> /// <param name="value">The needed DW.WPFToolkit.Helpers.BindingAdapter.BindingExtensions value.</param> public static void SetBindingExtensions(DependencyObject obj, BindingExtensionCollection value) { obj.SetValue(BindingExtensionsProperty, value); }