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))); }
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)); }