Пример #1
0
        /// <summary>
        /// Occurs after the value is set for an <see cref="IPropertyModel"/>.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <c>PropertyModelValueChangeEventArgs</c> that contains the event data.</param>
        private void OnPropertyGridPropertyValueChanged(object sender, PropertyModelValueChangeEventArgs e)
        {
            var person  = e.PropertyModel.Target as Person;
            var message = string.Format("Changed {0} on {1}, {2} (value = {3})", e.PropertyModel.Name, person.LastName, person.FirstName, e.Value);

            this.AppendMessage(message);
            e.Handled = true;
        }
Пример #2
0
        /////////////////////////////////////////////////////////////////////////////////////////////////////
        // PUBLIC PROCEDURES
        /////////////////////////////////////////////////////////////////////////////////////////////////////

        /// <summary>
        /// Occurs after the value is set for an <see cref="IPropertyModel"/>.
        /// </summary>
        /// <param name="e">The <c>PropertyModelValueChangeEventArgs</c> that contains the event data.</param>
        protected override void OnPropertyValueChanged(PropertyModelValueChangeEventArgs e)
        {
            // Call the base method
            base.OnPropertyValueChanged(e);

            // Ensure the target element is scrolled into view
            var element = e.PropertyModel.Target as FrameworkElement;

            if (element != null)
            {
                element.BringIntoView();
            }
        }
Пример #3
0
        /////////////////////////////////////////////////////////////////////////////////////////////////////
        // NON-PUBLIC PROCEDURES
        /////////////////////////////////////////////////////////////////////////////////////////////////////

        /// <summary>
        /// Occurs after the value is set for an <see cref="IPropertyModel"/>.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <c>PropertyModelValueChangeEventArgs</c> that contains the event data.</param>
        private void OnPropertyGridPropertyValueChanged(object sender, PropertyModelValueChangeEventArgs e)
        {
            chart.Refresh();
        }