private void RebuildEditor(PropertyItem propertyItem)
        {
            ObjectContainerHelperBase objectContainerHelperBase = propertyItem.ContainerHelper as ObjectContainerHelperBase;
            //Re-build the editor to update this propertyItem
            FrameworkElement editor = objectContainerHelperBase.GenerateChildrenEditorElement(propertyItem);

            if (editor != null)
            {
                // Tag the editor as generated to know if we should clear it.
                ContainerHelperBase.SetIsGenerated(editor, true);
                propertyItem.Editor = editor;
            }
        }
Exemple #2
0
        private void RebuildEditor(PropertyItem propertyItem)
        {
            ObjectContainerHelperBase objectContainerHelperBase = propertyItem.ContainerHelper as ObjectContainerHelperBase;
            //Re-build the editor to update this propertyItem
            FrameworkElement editor = objectContainerHelperBase.GenerateChildrenEditorElement(propertyItem);

            if (editor != null)
            {
                // Tag the editor as generated to know if we should clear it.
                ContainerHelperBase.SetIsGenerated(editor, true);
                propertyItem.Editor = editor;

                //Update Source of binding and Validation of PropertyItem to update
                var be = propertyItem.GetBindingExpression(PropertyItem.ValueProperty);
                if (be != null)
                {
                    be.UpdateSource();
                    propertyItem.SetRedInvalidBorder(be);
                }
            }
        }