public static VisualStateBindingCollection GetBindings(UIElement element) { var bindingCollection = element.GetValue(BindingsProperty) as VisualStateBindingCollection; if (bindingCollection == null) { bindingCollection = new VisualStateBindingCollection(); element.SetValue(BindingsProperty, bindingCollection); } return bindingCollection; }
public static void SetBindings(UIElement element, VisualStateBindingCollection value) { element.SetValue(BindingsProperty, value); }