public override void UpdateEditor(ContentItem item, Control editor) { if (editor is IContentBinder) { IContentBinder binder = editor as IContentBinder; binder.UpdateInterface(item); } else { Utility.SetProperty(editor, UserControlPropertyName, item[Name]); } }
public override bool UpdateItem(ContentItem item, Control editor) { if (editor is IContentBinder) { IContentBinder binder = editor as IContentBinder; return(binder.UpdateObject(item)); } else { var current = item[Name]; var updated = Utility.GetProperty(editor, UserControlPropertyName); if (current == updated) { return(false); } item[Name] = updated; return(true); } }