protected void SetValue(object model, object value, string propName)
        {
            UndoRedoPropertyItem propItem = new UndoRedoPropertyItem();

            propItem.ModelObject = model;
            propItem.PropertyStr = propName;
            propItem.NewValue    = value;
            propItem.DoCommand();
            UndoRedoSystem.AddToUndoStack(propItem);
        }
        protected void SetValue(object model, object value, Action command = null, [CallerMemberName] string propName = null)
        {
            UndoRedoPropertyItem propItem = new UndoRedoPropertyItem();

            propItem.ModelObject = model;
            propItem.PropertyStr = propName;
            propItem.NewValue    = value;
            propItem.Command     = command;
            propItem.DoCommand();
            UndoRedoSystem.AddToUndoStack(propItem);
        }
        protected void SetValueMulti(object model, params Tuple <object, string>[] props)
        {
            UndoRedoMultiPropertyItem multiPropItem = new UndoRedoMultiPropertyItem();

            foreach (Tuple <object, string> prop in props)
            {
                UndoRedoPropertyItem propItem = new UndoRedoPropertyItem();
                propItem.ModelObject = model;
                propItem.PropertyStr = prop.Item2;
                propItem.NewValue    = prop.Item1;

                multiPropItem.Properties.Add(propItem);
            }
            multiPropItem.DoCommand();
            UndoRedoSystem.AddToUndoStack(multiPropItem);
        }