Beispiel #1
0
        public void SetAnimationValue(DependencyProperty dependencyProperty, object value)
        {
            if (dependencyProperty == null)
            {
                throw new ArgumentNullException("No property specified");
            }

            var storage = INTERNAL_PropertyStore.GetStorageOrCreateNewIfNotExists(this, dependencyProperty);

            INTERNAL_PropertyStore.SetSpecificValue(storage, KindOfValue.Animated, value);
        }
Beispiel #2
0
        /// <summary>
        /// Sets the local value of a dependency property on a DependencyObject while not overriding a hypothetical Binding (example: when the user writes in a TextBox with a two way Binding on its Text property).
        /// </summary>
        /// <param name="dependencyProperty">The identifier of the dependency property to set.</param>
        /// <param name="value">The new local value.</param>
        public void SetLocalValue(DependencyProperty dependencyProperty, object value)
        {
#if PERFSTAT
            var t = Performance.now();
#endif
            var storage = INTERNAL_PropertyStore.GetStorageOrCreateNewIfNotExists(this, dependencyProperty);
#if PERFSTAT
            Performance.Counter("DependencyObject.SetLocalValue", t);
#endif
            INTERNAL_PropertyStore.SetSpecificValue(storage, KindOfValue.Local, value);
        }