调优
This commit is contained in:
@@ -246,5 +246,14 @@ namespace Deedy
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public Window? GetWindow()
|
||||||
|
{
|
||||||
|
DependencyObject parent = this;
|
||||||
|
while (parent != null && !(parent is Window))
|
||||||
|
{
|
||||||
|
parent = VisualTreeHelper.GetParent(parent);
|
||||||
|
}
|
||||||
|
return parent as Window;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user