コード例 #1
0
        public static void AddChangeHandler <T>(this T element, Expression <Func <object> > expression, PropertyChangedHandler <T> handler)
            where T : FrameworkElement
        {
            string propertyPath;
            var    propertyInfo       = expression.GetPropertyInfo();
            var    dependencyProperty = DependencyPropertyHelper.GetDependencyPropertyByPropertyName(element, propertyInfo.Name, out propertyPath);

            AddChangeHandler(element, dependencyProperty, handler);
        }