@@ -30,7 +30,6 @@ public FolderLayoutModes LayoutMode
30
30
if ( SetProperty ( ref LayoutPreference . LayoutMode , value , nameof ( LayoutMode ) ) )
31
31
{
32
32
UpdateLayoutPreferencesForPath ( associatedInstance . FilesystemViewModel . WorkingDirectory , LayoutPreference ) ;
33
- LayoutModeChangeRequested ? . Invoke ( this , EventArgs . Empty ) ;
34
33
}
35
34
}
36
35
}
@@ -83,30 +82,40 @@ public Type GetLayoutType(string folderPath)
83
82
LayoutMode = FolderLayoutModes . GridView ; // Grid View
84
83
85
84
GridViewSize = Constants . Browser . GridViewBrowser . GridViewSizeLarge ; // Size
85
+
86
+ LayoutModeChangeRequested ? . Invoke ( this , EventArgs . Empty ) ;
86
87
} ) ;
87
88
88
89
public RelayCommand ToggleLayoutModeGridViewMedium => new RelayCommand ( ( ) =>
89
90
{
90
91
LayoutMode = FolderLayoutModes . GridView ; // Grid View
91
92
92
93
GridViewSize = Constants . Browser . GridViewBrowser . GridViewSizeMedium ; // Size
94
+
95
+ LayoutModeChangeRequested ? . Invoke ( this , EventArgs . Empty ) ;
93
96
} ) ;
94
97
95
98
public RelayCommand ToggleLayoutModeGridViewSmall => new RelayCommand ( ( ) =>
96
99
{
97
100
LayoutMode = FolderLayoutModes . GridView ; // Grid View
98
101
99
102
GridViewSize = Constants . Browser . GridViewBrowser . GridViewSizeSmall ; // Size
103
+
104
+ LayoutModeChangeRequested ? . Invoke ( this , EventArgs . Empty ) ;
100
105
} ) ;
101
106
102
107
public RelayCommand ToggleLayoutModeTiles => new RelayCommand ( ( ) =>
103
108
{
104
109
LayoutMode = FolderLayoutModes . TilesView ; // Tiles View
110
+
111
+ LayoutModeChangeRequested ? . Invoke ( this , EventArgs . Empty ) ;
105
112
} ) ;
106
113
107
114
public RelayCommand ToggleLayoutModeDetailsView => new RelayCommand ( ( ) =>
108
115
{
109
116
LayoutMode = FolderLayoutModes . DetailsView ; // Details View
117
+
118
+ LayoutModeChangeRequested ? . Invoke ( this , EventArgs . Empty ) ;
110
119
} ) ;
111
120
112
121
public int GridViewSize
@@ -119,10 +128,12 @@ public int GridViewSize
119
128
if ( LayoutMode == FolderLayoutModes . TilesView ) // Size down from tiles to list
120
129
{
121
130
LayoutMode = 0 ;
131
+ LayoutModeChangeRequested ? . Invoke ( this , EventArgs . Empty ) ;
122
132
}
123
133
else if ( LayoutMode == FolderLayoutModes . GridView && value < Constants . Browser . GridViewBrowser . GridViewSizeSmall ) // Size down from grid to tiles
124
134
{
125
135
LayoutMode = FolderLayoutModes . TilesView ;
136
+ LayoutModeChangeRequested ? . Invoke ( this , EventArgs . Empty ) ;
126
137
}
127
138
else if ( LayoutMode != FolderLayoutModes . DetailsView ) // Resize grid view
128
139
{
@@ -132,6 +143,7 @@ public int GridViewSize
132
143
if ( LayoutMode != FolderLayoutModes . GridView ) // Only update layout mode if it isn't already in grid view
133
144
{
134
145
LayoutMode = FolderLayoutModes . GridView ;
146
+ LayoutModeChangeRequested ? . Invoke ( this , EventArgs . Empty ) ;
135
147
}
136
148
else
137
149
{
@@ -146,6 +158,7 @@ public int GridViewSize
146
158
if ( LayoutMode == 0 ) // Size up from list to tiles
147
159
{
148
160
LayoutMode = FolderLayoutModes . TilesView ;
161
+ LayoutModeChangeRequested ? . Invoke ( this , EventArgs . Empty ) ;
149
162
}
150
163
else // Size up from tiles to grid
151
164
{
@@ -155,6 +168,7 @@ public int GridViewSize
155
168
if ( LayoutMode != FolderLayoutModes . GridView ) // Only update layout mode if it isn't already in grid view
156
169
{
157
170
LayoutMode = FolderLayoutModes . GridView ;
171
+ LayoutModeChangeRequested ? . Invoke ( this , EventArgs . Empty ) ;
158
172
}
159
173
else
160
174
{
0 commit comments