@@ -41,7 +41,6 @@ public SettingsViewModel()
4141 {
4242 _roamingSettings = ApplicationData . Current . RoamingSettings ;
4343
44- DetectAcrylicPreference ( ) ;
4544 DetectDateTimeFormat ( ) ;
4645 PinSidebarLocationItems ( ) ;
4746 DetectRecycleBinPreference ( ) ;
@@ -58,7 +57,7 @@ public SettingsViewModel()
5857 Analytics . TrackEvent ( "PinRecycleBinToSideBar " + PinRecycleBinToSideBar . ToString ( ) ) ;
5958 Analytics . TrackEvent ( "ShowFileExtensions " + ShowFileExtensions . ToString ( ) ) ;
6059 Analytics . TrackEvent ( "ShowConfirmDeleteDialog " + ShowConfirmDeleteDialog . ToString ( ) ) ;
61- Analytics . TrackEvent ( "AcrylicSidebar " + AcrylicEnabled . ToString ( ) ) ;
60+ Analytics . TrackEvent ( "IsAcrylicDisabled " + IsAcrylicDisabled . ToString ( ) ) ;
6261 Analytics . TrackEvent ( "ShowFileOwner " + ShowFileOwner . ToString ( ) ) ;
6362 Analytics . TrackEvent ( "IsHorizontalTabStripEnabled " + IsHorizontalTabStripEnabled . ToString ( ) ) ;
6463 Analytics . TrackEvent ( "IsVerticalTabFlyoutEnabled " + IsVerticalTabFlyoutEnabled . ToString ( ) ) ;
@@ -510,28 +509,10 @@ public bool ListAndSortDirectoriesAlongsideFiles
510509 set => Set ( value ) ;
511510 }
512511
513- private void DetectAcrylicPreference ( )
512+ public bool IsAcrylicDisabled
514513 {
515- if ( localSettings . Values [ "AcrylicEnabled" ] == null )
516- {
517- localSettings . Values [ "AcrylicEnabled" ] = true ;
518- }
519- AcrylicEnabled = ( bool ) localSettings . Values [ "AcrylicEnabled" ] ;
520- }
521-
522- private bool _AcrylicEnabled = true ;
523-
524- public bool AcrylicEnabled
525- {
526- get => _AcrylicEnabled ;
527- set
528- {
529- if ( value != _AcrylicEnabled )
530- {
531- SetProperty ( ref _AcrylicEnabled , value ) ;
532- localSettings . Values [ "AcrylicEnabled" ] = value ;
533- }
534- }
514+ get => Get ( true ) ;
515+ set => Set ( value ) ;
535516 }
536517
537518 public bool ShowAllContextMenuItems
@@ -772,10 +753,11 @@ public TValue Get<TValue>(TValue defaultValue, [CallerMemberName] string propert
772753 Set ( tValue , propertyName ) ; // Put the corrected value in settings.
773754 return tValue ;
774755 }
775-
776756 return tValue ;
777757 }
778758
759+ _roamingSettings . Values [ propertyName ] = defaultValue ;
760+
779761 return defaultValue ;
780762 }
781763
0 commit comments