@@ -106,8 +106,8 @@ public static List<ContextMenuFlyoutItemViewModel> GetBaseItemMenuItems(
106106 ShowInSearchPage = true ,
107107 ShowInFtpPage = true ,
108108 ShowInZipPage = true ,
109- Items = new List < ContextMenuFlyoutItemViewModel >
110- {
109+ Items =
110+ [
111111 new ContextMenuFlyoutItemViewModelBuilder ( Commands . LayoutDetails )
112112 {
113113 IsToggle = true
@@ -132,7 +132,7 @@ public static List<ContextMenuFlyoutItemViewModel> GetBaseItemMenuItems(
132132 {
133133 IsToggle = true
134134 } . Build ( ) ,
135- } ,
135+ ] ,
136136 } ,
137137 new ContextMenuFlyoutItemViewModel ( )
138138 {
@@ -146,8 +146,8 @@ public static List<ContextMenuFlyoutItemViewModel> GetBaseItemMenuItems(
146146 ShowInSearchPage = true ,
147147 ShowInFtpPage = true ,
148148 ShowInZipPage = true ,
149- Items = new List < ContextMenuFlyoutItemViewModel >
150- {
149+ Items =
150+ [
151151 new ContextMenuFlyoutItemViewModelBuilder ( Commands . SortByName )
152152 {
153153 IsToggle = true
@@ -204,7 +204,7 @@ public static List<ContextMenuFlyoutItemViewModel> GetBaseItemMenuItems(
204204 {
205205 IsToggle = true
206206 } . Build ( ) ,
207- } ,
207+ ] ,
208208 } ,
209209 new ContextMenuFlyoutItemViewModel ( )
210210 {
@@ -215,8 +215,8 @@ public static List<ContextMenuFlyoutItemViewModel> GetBaseItemMenuItems(
215215 ShowInSearchPage = true ,
216216 ShowInFtpPage = true ,
217217 ShowInZipPage = true ,
218- Items = new List < ContextMenuFlyoutItemViewModel >
219- {
218+ Items =
219+ [
220220 new ContextMenuFlyoutItemViewModelBuilder ( Commands . GroupByNone )
221221 {
222222 IsToggle = true
@@ -232,8 +232,8 @@ public static List<ContextMenuFlyoutItemViewModel> GetBaseItemMenuItems(
232232 ShowInSearchPage = true ,
233233 ShowInFtpPage = true ,
234234 ShowInZipPage = true ,
235- Items = new List < ContextMenuFlyoutItemViewModel >
236- {
235+ Items =
236+ [
237237 new ContextMenuFlyoutItemViewModelBuilder ( Commands . GroupByDateModifiedYear )
238238 {
239239 IsToggle = true
@@ -246,7 +246,7 @@ public static List<ContextMenuFlyoutItemViewModel> GetBaseItemMenuItems(
246246 {
247247 IsToggle = true
248248 } . Build ( ) ,
249- } ,
249+ ] ,
250250 } ,
251251 new ContextMenuFlyoutItemViewModel ( )
252252 {
@@ -255,8 +255,8 @@ public static List<ContextMenuFlyoutItemViewModel> GetBaseItemMenuItems(
255255 ShowInSearchPage = true ,
256256 ShowInFtpPage = true ,
257257 ShowInZipPage = true ,
258- Items = new List < ContextMenuFlyoutItemViewModel >
259- {
258+ Items =
259+ [
260260 new ContextMenuFlyoutItemViewModelBuilder ( Commands . GroupByDateCreatedYear )
261261 {
262262 IsToggle = true
@@ -269,7 +269,7 @@ public static List<ContextMenuFlyoutItemViewModel> GetBaseItemMenuItems(
269269 {
270270 IsToggle = true
271271 } . Build ( ) ,
272- } ,
272+ ] ,
273273 } ,
274274 new ContextMenuFlyoutItemViewModelBuilder ( Commands . GroupByType )
275275 {
@@ -296,8 +296,8 @@ public static List<ContextMenuFlyoutItemViewModel> GetBaseItemMenuItems(
296296 Text = "DateDeleted" . GetLocalizedResource ( ) ,
297297 ShowInRecycleBin = true ,
298298 IsHidden = ! currentInstanceViewModel . IsPageTypeRecycleBin ,
299- Items = new List < ContextMenuFlyoutItemViewModel >
300- {
299+ Items =
300+ [
301301 new ContextMenuFlyoutItemViewModelBuilder ( Commands . GroupByDateDeletedYear )
302302 {
303303 IsToggle = true
@@ -310,7 +310,7 @@ public static List<ContextMenuFlyoutItemViewModel> GetBaseItemMenuItems(
310310 {
311311 IsToggle = true
312312 } . Build ( ) ,
313- } ,
313+ ] ,
314314 } ,
315315 new ContextMenuFlyoutItemViewModelBuilder ( Commands . GroupByFolderPath )
316316 {
@@ -334,7 +334,7 @@ public static List<ContextMenuFlyoutItemViewModel> GetBaseItemMenuItems(
334334 IsToggle = true ,
335335 IsVisible = true
336336 } . Build ( ) ,
337- } ,
337+ ] ,
338338 } ,
339339 new ContextMenuFlyoutItemViewModelBuilder ( Commands . RefreshItems )
340340 {
@@ -387,13 +387,13 @@ public static List<ContextMenuFlyoutItemViewModel> GetBaseItemMenuItems(
387387 Tag = "OpenWithOverflow" ,
388388 IsHidden = true ,
389389 CollapseLabel = true ,
390- Items = new List < ContextMenuFlyoutItemViewModel > ( ) {
390+ Items = [
391391 new ( )
392392 {
393393 Text = "Placeholder" ,
394394 ShowInSearchPage = true ,
395395 }
396- } ,
396+ ] ,
397397 ShowInSearchPage = true ,
398398 ShowItem = itemsSelected && showOpenItemWith
399399 } ,
@@ -406,12 +406,12 @@ public static List<ContextMenuFlyoutItemViewModel> GetBaseItemMenuItems(
406406 Text = "BaseLayoutItemContextFlyoutSetAs/Text" . GetLocalizedResource ( ) ,
407407 ShowItem = itemsSelected && ( selectedItemsPropertiesViewModel ? . IsSelectedItemImage ?? false ) ,
408408 ShowInSearchPage = true ,
409- Items = new List < ContextMenuFlyoutItemViewModel >
410- {
409+ Items =
410+ [
411411 new ContextMenuFlyoutItemViewModelBuilder ( Commands . SetAsWallpaperBackground ) . Build ( ) ,
412412 new ContextMenuFlyoutItemViewModelBuilder ( Commands . SetAsLockscreenBackground ) . Build ( ) ,
413413 new ContextMenuFlyoutItemViewModelBuilder ( Commands . SetAsSlideshowBackground ) . Build ( ) ,
414- }
414+ ]
415415 } ,
416416 new ContextMenuFlyoutItemViewModelBuilder ( Commands . RotateLeft )
417417 {
@@ -511,12 +511,12 @@ public static List<ContextMenuFlyoutItemViewModel> GetBaseItemMenuItems(
511511 {
512512 OpacityIconStyle = "ColorIconZip" ,
513513 } ,
514- Items = new List < ContextMenuFlyoutItemViewModel >
515- {
514+ Items =
515+ [
516516 new ContextMenuFlyoutItemViewModelBuilder ( Commands . CompressIntoArchive ) . Build ( ) ,
517517 new ContextMenuFlyoutItemViewModelBuilder ( Commands . CompressIntoZip ) . Build ( ) ,
518518 new ContextMenuFlyoutItemViewModelBuilder ( Commands . CompressIntoSevenZip ) . Build ( ) ,
519- } ,
519+ ] ,
520520 ShowItem = UserSettingsService . GeneralSettingsService . ShowCompressionOptions && itemsSelected && CompressHelper . CanCompress ( selectedItems )
521521 } ,
522522 new ContextMenuFlyoutItemViewModel
@@ -527,13 +527,13 @@ public static List<ContextMenuFlyoutItemViewModel> GetBaseItemMenuItems(
527527 {
528528 OpacityIconStyle = "ColorIconZip" ,
529529 } ,
530- Items = new List < ContextMenuFlyoutItemViewModel >
531- {
530+ Items =
531+ [
532532 new ContextMenuFlyoutItemViewModelBuilder ( Commands . DecompressArchive ) . Build ( ) ,
533533 new ContextMenuFlyoutItemViewModelBuilder ( Commands . DecompressArchiveHereSmart ) . Build ( ) ,
534534 new ContextMenuFlyoutItemViewModelBuilder ( Commands . DecompressArchiveHere ) . Build ( ) ,
535535 new ContextMenuFlyoutItemViewModelBuilder ( Commands . DecompressArchiveToChildFolder ) . Build ( ) ,
536- } ,
536+ ] ,
537537 ShowItem = UserSettingsService . GeneralSettingsService . ShowCompressionOptions && CompressHelper . CanDecompress ( selectedItems )
538538 } ,
539539 new ContextMenuFlyoutItemViewModel ( )
@@ -550,13 +550,13 @@ public static List<ContextMenuFlyoutItemViewModel> GetBaseItemMenuItems(
550550 Tag = "SendToOverflow" ,
551551 IsHidden = true ,
552552 CollapseLabel = true ,
553- Items = new List < ContextMenuFlyoutItemViewModel > ( ) {
553+ Items = [
554554 new ( )
555555 {
556556 Text = "Placeholder" ,
557557 ShowInSearchPage = true ,
558558 }
559- } ,
559+ ] ,
560560 ShowInSearchPage = true ,
561561 ShowItem = itemsSelected && UserSettingsService . GeneralSettingsService . ShowSendToMenu
562562 } ,
@@ -592,7 +592,7 @@ public static List<ContextMenuFlyoutItemViewModel> GetBaseItemMenuItems(
592592 {
593593 Text = "Loading" . GetLocalizedResource ( ) ,
594594 Glyph = "\xE712 " ,
595- Items = new List < ContextMenuFlyoutItemViewModel > ( ) ,
595+ Items = [ ] ,
596596 ID = "ItemOverflow" ,
597597 Tag = "ItemOverflow" ,
598598 ShowInFtpPage = true ,
@@ -671,7 +671,7 @@ public static void SwapPlaceholderWithShellOption(CommandBarFlyout contextMenu,
671671
672672 if ( replacingItem is not null )
673673 {
674- var ( _, bitLockerCommands ) = ContextFlyoutModelToElementHelper . GetAppBarItemsFromModel ( new List < ContextMenuFlyoutItemViewModel > ( ) { replacingItem } ) ;
674+ var ( _, bitLockerCommands ) = ContextFlyoutModelToElementHelper . GetAppBarItemsFromModel ( [ replacingItem ] ) ;
675675 contextMenu . SecondaryCommands . Insert (
676676 position ,
677677 bitLockerCommands . FirstOrDefault ( )
0 commit comments