Пример #1
0
        private static PropertyPath GetDataContextRelativePath(PropertyPath path, object source, RelativeSource relativeSource, string elementName)
        {
            if (source != null || relativeSource != null || !elementName.IsNullOrEmpty())
            {
                return(path);
            }

            return(path.Insert(0, new DependencyPropertyPathElement(FrameworkElement.DataContextProperty)));
        }
Пример #2
0
        private static PropertyPath GetDataContextRelativePath(PropertyPath path, object source, RelativeSource relativeSource, string elementName)
        {
            if (source != null || relativeSource != null || !elementName.IsNullOrEmpty())
            {
                return path;
            }

            return path.Insert(0, new DependencyPropertyPathElement(FrameworkElement.DataContextProperty));
        }