Am I trying to get the window that the usercontrol belongs to?
I am trying to open a dialog box from a custom usercontrol, the current window is needed to open it. What can I do? This is what I'm doing now, but how good is this solution?
var window = this.GetVisualRoot();
var result = await dialog.ShowDialog<bool>((Window)window);
I used this
TopLevel.GetTopLevel(this) as Window