/// <summary> /// Creates a binding and sets it on the element, guarding against pre-existing bindings. /// </summary> public static bool SetBindingWithoutBindingOverwrite(Type viewModelType, string path, PropertyInfo property, VisualElement element, ElementConvention convention, BindableProperty bindableProperty) { if (bindableProperty == null || HasBinding(element, bindableProperty)) { return(false); } SetBinding(viewModelType, path, property, element, convention, bindableProperty); return(true); }
/// <summary> /// Adds an element convention. /// </summary> /// <param name="convention"></param> public static ElementConvention AddElementConvention(ElementConvention convention) { return(ElementConventions[convention.ElementType] = convention); }