Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit c83e3e9

Browse files
MAnage out of screen window
1 parent 822d849 commit c83e3e9

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

‎RegexDialog/RegExToolDialog.xaml.cs‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,26 @@ private void Init()
226226
Width = Config.Instance.DialogWidth ?? Width;
227227
Height = Config.Instance.DialogHeight ?? Height;
228228

229+
if (Top < SystemParameters.VirtualScreenTop)
230+
{
231+
Top = SystemParameters.VirtualScreenTop;
232+
}
233+
234+
if (Left < SystemParameters.VirtualScreenLeft)
235+
{
236+
Left = SystemParameters.VirtualScreenLeft;
237+
}
238+
239+
if (Left + Width > SystemParameters.VirtualScreenLeft + SystemParameters.VirtualScreenWidth)
240+
{
241+
Left = SystemParameters.VirtualScreenWidth + SystemParameters.VirtualScreenLeft - Width;
242+
}
243+
244+
if (Top + Height > SystemParameters.VirtualScreenTop + SystemParameters.VirtualScreenHeight)
245+
{
246+
Top = SystemParameters.VirtualScreenHeight + SystemParameters.VirtualScreenTop - Height;
247+
}
248+
229249
WindowState = Config.Instance.DialogMaximized ? WindowState.Maximized : WindowState.Normal;
230250

231251
FirstColumn.Width = Config.Instance.GridFirstColumnWidth;

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /