GEMR: Get the parent window for view

Window window = Utilities.GetVisualParent<Window>(this);
if (window != null)
{
window.DialogResult = true;
}

原文地址:https://www.cnblogs.com/quietwalk/p/3668681.html