File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change 13
13
ShowInTaskbar =" {Binding !IsMinimized, Mode=TwoWay}"
14
14
Topmost =" True"
15
15
WindowStartupLocation =" CenterScreen"
16
+ Loaded =" HideWindowOnLoaded"
16
17
x : Class =" SiteMonitor.Views.MainWindow"
17
18
x : DataType =" viewModels:MainWindowViewModel"
18
19
Icon =" /Assets/logo.ico"
Original file line number Diff line number Diff line change 3
3
using System . Threading . Tasks ;
4
4
5
5
using Avalonia . Controls ;
6
+ using Avalonia . Interactivity ;
6
7
7
8
using Nullinside . Api . Common . Desktop ;
8
9
#if ! DEBUG
@@ -92,4 +93,9 @@ protected override void OnInitialized() {
92
93
#endif
93
94
} ) ;
94
95
}
96
+
97
+ private void HideWindowOnLoaded ( object ? sender , RoutedEventArgs e ) {
98
+ var window = ( Window ) sender ! ;
99
+ window . WindowState = WindowState . Minimized ;
100
+ }
95
101
}
You can’t perform that action at this time.
0 commit comments