Esempio n. 1
0
        /// <summary>
        /// Gets the value of the member for the specified instance.
        /// </summary>
        /// <param name="instance">The instance to get the value for.</param>
        /// <returns>The value of the member.</returns>
        public override Object GetValue(Object instance)
        {
            if (DependencyProperty == null)
            {
                return(_Property.GetValue(instance));
            }

            IDependencyObject dependencyObject = (IDependencyObject)instance;

            return(dependencyObject.GetValueExtension(DependencyProperty) ?? dependencyObject.GetBaseValue(DependencyProperty));
        }