@@ -38,8 +38,25 @@ public class MainWindowViewModel : ViewModelBase
3838 private bool _showintaskbar ;
3939 private bool _displaydetails ;
4040 private string _currentfont ;
41+ private int _windowHeight ;
42+ private int _windowWidht ;
43+ private bool _isWindowResizeBarVisible ;
4144
42-
45+ public bool IsWindowResizeBarVisible
46+ {
47+ get { return _isWindowResizeBarVisible ; }
48+ set { SetProperty ( ref _isWindowResizeBarVisible , value , ( ) => IsWindowResizeBarVisible ) ; }
49+ }
50+ public int WindowWidht
51+ {
52+ get { return _windowWidht ; }
53+ set { SetProperty ( ref _windowWidht , value , ( ) => WindowWidht ) ; }
54+ }
55+ public int WindowHeight
56+ {
57+ get { return _windowHeight ; }
58+ set { SetProperty ( ref _windowHeight , value , ( ) => WindowHeight ) ; }
59+ }
4360 public string CurrentFont
4461 {
4562 get { return _currentfont ; }
@@ -140,7 +157,10 @@ public string MultiLine
140157
141158
142159 public Settings Settings { get ; set ; }
160+
143161 public ICommand ResetViewCommand { get ; set ; }
162+ public ICommand ReduceWindowSizeCommand { get ; set ; }
163+ public ICommand IncreaseWindowSizeCommand { get ; set ; }
144164
145165
146166
@@ -150,6 +170,8 @@ public MainWindowViewModel()
150170 LoadSettings ( SettingsLoadLocations . FromFile ) ;
151171 InitViewModel ( ) ;
152172 }
173+
174+
153175 private void LoadAvailableThemesAndAccents ( )
154176 {
155177 Themes = new ObservableCollection < string > ( ) { ThemeManager . BaseColorLight , ThemeManager . BaseColorDark } ;
@@ -188,8 +210,28 @@ private void UpdateProperties()
188210
189211 private void InitViewModel ( )
190212 {
213+ WindowHeight = 350 ;
214+ WindowWidht = 650 ;
215+ IsWindowResizeBarVisible = true ;
191216 Fonts = new ObservableCollection < string > ( LoadInstalledFonts ( ) ) ;
192217 ResetViewCommand = new DelegateCommand ( ResetView ) ;
218+ ReduceWindowSizeCommand = new DelegateCommand ( ReduceWindowSize ) ;
219+ IncreaseWindowSizeCommand = new DelegateCommand ( IncreaseWindowSize ) ;
220+ }
221+
222+ private void ReduceWindowSize ( )
223+ {
224+ if ( this . WindowHeight > 100 )
225+ this . WindowHeight -= 15 ;
226+ if ( IsWindowResizeBarVisible )
227+ if ( this . WindowWidht > 500 )
228+ this . WindowWidht -= 15 ;
229+ }
230+
231+ private void IncreaseWindowSize ( )
232+ {
233+ this . WindowHeight += 15 ;
234+ this . WindowWidht += 15 ;
193235 }
194236
195237 private IEnumerable < string > LoadInstalledFonts ( )
@@ -213,9 +255,6 @@ private void UpdateFontColorOnThemeSelectionChanged()
213255 MultiLineTextForegroundColor = LIGHT_GRAY ;
214256 }
215257
216-
217-
218-
219258 public void SaveSettingsOnClose ( )
220259 {
221260 Settings . SelectedAccentName = this . SelectedAccent ;
0 commit comments