I have the following code:
System.Windows.Point ponto = PointToScreen(Mouse.GetPosition(this)); JanelaAbrir.Left = ponto.X; JanelaAbrir.Top = ponto.Y; JanelaAbrir.ShowDialog();
It opens the window in the mouse position, but this window can go beyond the limits of the monitor, how can I make it not to exceed the limits?
To illustrate, an image follows:
When opening the window it goes beyond the border, limit the screen (monitor), preventing the user to see the full window, forcing it to drag.