Skip to content

Commit

Permalink
same fix for overloading as in #73
Browse files Browse the repository at this point in the history
  • Loading branch information
punker76 committed Sep 25, 2013
1 parent 895013f commit 843115a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public static DependencyObject GetVisualAncestor(this DependencyObject d, Type t
var item = VisualTreeHelper.GetParent(d.FindVisualTreeRoot());
DependencyObject lastFoundItemByType = null;

while (item != null) {
while (item != null && type != null) {
if (item == itemsControl) {
return lastFoundItemByType;
}
Expand Down

0 comments on commit 843115a

Please sign in to comment.