示例#1
0
        private void CommitChange()
        {
            if (!m_transactionOpen)
            {
                ValueEditorUtil.ExecuteCommand(BeginCommand, this, null);
            }

            ValueEditorUtil.UpdateBinding(this, ValueProperty, false);
            ValueEditorUtil.ExecuteCommand(CommitCommand, this, null);
            m_transactionOpen = false;
            ValueEditorUtil.UpdateBinding(this, ValueProperty, UpdateBindingType.Target);

            UpdateTextFromValue();
        }
示例#2
0
        private void UpdateChange()
        {
            if (!m_transactionOpen)
            {
                ValueEditorUtil.ExecuteCommand(BeginCommand, this, null);
            }

            Value = UnFormat(Text);

            ValueEditorUtil.ExecuteCommand(UpdateCommand, this, null);
            m_transactionOpen = true;
            ValueEditorUtil.UpdateBinding(this, ValueProperty, UpdateBindingType.Target);

            UpdateTextFromValue();
        }