@@ -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