Ejemplo n.º 1
0
        protected override bool UpdateValueCore(string name, string value, UndoRedoRecorder recorder)
        {
            if (name == "Value")
            {
                var converter = new MeasureConverter();
                this.Value = ((double)converter.ConvertBack(value, typeof(double), Measure, null));
                return(true); // UpdateValueCore handled.
            }

            return(base.UpdateValueCore(name, value, recorder));
        }
Ejemplo n.º 2
0
        protected override bool UpdateValueCore(UpdateValueParams updateValueParams)
        {
            string name  = updateValueParams.PropertyName;
            string value = updateValueParams.PropertyValue;

            if (name == "Value")
            {
                var converter = new MeasureConverter();
                this.Value = ((double)converter.ConvertBack(value, typeof(double), Measure, null));
                return(true); // UpdateValueCore handled.
            }

            return(base.UpdateValueCore(updateValueParams));
        }