Skip to content

Portable Tool for an Ideal Windows Setup

upd. unify overlay dialogs into a global manager & ref

Greedeks3e64c21547a6
diff --git a/.Source/GTweak/Styles/Inputs/ComboBox.xaml b/.Source/GTweak/Styles/Inputs/ComboBox.xaml
index 32f0844f..812bdda8 100644
--- a/.Source/GTweak/Styles/Inputs/ComboBox.xaml
+++ b/.Source/GTweak/Styles/Inputs/ComboBox.xaml
@@ -153,6 +153,10 @@
<ToggleButton Grid.Column="0" Grid.ColumnSpan="2" Background="Transparent" BorderBrush="Transparent" BorderThickness="0" IsChecked="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}">
<ToggleButton.Style>
<Style TargetType="ToggleButton">
+ <Setter Property="KeyboardNavigation.TabNavigation" Value="None"/>
+ <Setter Property="FocusVisualStyle" Value="{x:Null}" />
+ <Setter Property="Focusable" Value="False"/>
+ <Setter Property="IsTabStop" Value="False"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ToggleButton">
diff --git a/.Source/GTweak/Utilities/Animation/BrushAnimation.cs b/.Source/GTweak/Utilities/Animation/BrushAnimation.cs
index 845d5981..799fde16 100644
--- a/.Source/GTweak/Utilities/Animation/BrushAnimation.cs
+++ b/.Source/GTweak/Utilities/Animation/BrushAnimation.cs
@@ -38,7 +38,7 @@ namespace GTweak.Utilities.Animation
double progress = animationClock.CurrentProgress.Value;
- var easedProgress = new QuadraticEase().Ease(progress);
+ double easedProgress = new QuadraticEase().Ease(progress);
if (From is SolidColorBrush fromBrush && To is SolidColorBrush toBrush)
{
diff --git a/.Source/GTweak/Utilities/Configuration/MonitoringProvider.cs b/.Source/GTweak/Utilities/Configuration/MonitoringProvider.cs
index 8172c3c8..98b3c5d9 100644
--- a/.Source/GTweak/Utilities/Configuration/MonitoringProvider.cs
+++ b/.Source/GTweak/Utilities/Configuration/MonitoringProvider.cs
@@ -17,13 +17,7 @@ namespace GTweak.Utilities.Configuration
private readonly List<(ManagementEventWatcher watcher, EventArrivedEventHandler handler)> _watcherHandler = new List<(ManagementEventWatcher watcher, EventArrivedEventHandler handler)>();
private readonly ServiceController[] _servicesList = ServiceController.GetServices();
- internal enum DeviceType
- {
- All,
- Storage,
- Audio,
- Network
- }
+ internal enum DeviceType { All, Storage, Audio, Network }
[StructLayout(LayoutKind.Sequential)]
private struct SystemTime
@@ -35,15 +29,15 @@ namespace GTweak.Utilities.Configuration
[StructLayout(LayoutKind.Sequential)]
private class MemoryStatus
{
- public uint dwLength;
- public uint dwMemoryLoad;
- public ulong ullTotalPhys;
- public ulong ullAvailPhys;
- public ulong ullTotalPageFile;
- public ulong ullAvailPageFile;
- public ulong ullTotalVirtual;
- public ulong ullAvailVirtual;
- public ulong ullAvailExtendedVirtual;
+ internal uint dwLength;
+ internal uint dwMemoryLoad;
+ internal ulong ullTotalPhys;
+ internal ulong ullAvailPhys;
+ internal ulong ullTotalPageFile;
+ internal ulong ullAvailPageFile;
+ internal ulong ullTotalVirtual;
+ internal ulong ullAvailVirtual;
+ internal ulong ullAvailExtendedVirtual;
internal MemoryStatus() => dwLength = (uint)Marshal.SizeOf(typeof(MemoryStatus));
}
diff --git a/.Source/GTweak/Utilities/Managers/OverlayDialogManager.cs b/.Source/GTweak/Utilities/Managers/OverlayDialogManager.cs
index 0946394a..ca21b12d 100644
--- a/.Source/GTweak/Utilities/Managers/OverlayDialogManager.cs
+++ b/.Source/GTweak/Utilities/Managers/OverlayDialogManager.cs
@@ -1,4 +1,3 @@
-using System;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
@@ -6,61 +5,70 @@ using GTweak.Utilities.Animation;
namespace GTweak.Utilities.Managers
{
- internal sealed class OverlayDialogManager
+ internal static class OverlayDialogManager
{
- private readonly FrameworkElement _overlay;
- private readonly DependencyProperty _opacityProperty;
- private readonly Button _btnPrimary;
- private readonly Button _btnSecondary;
- private readonly Action _onPrimary;
- private readonly Action _onSecondary;
+ private static FrameworkElement _overlay;
+ private static TextBlock _tbTitle, _tbText, _tbQuestion;
+ private static Button _btnPrimary, _btnSecondary;
- internal OverlayDialogManager(FrameworkElement overlay, DependencyProperty opacityProperty, Button btnPrimary, Button btnSecondary, Action onPrimary = null, Action onSecondary = null)
+ private static TaskCompletionSource<bool?> _tcs;
+
+ internal static void Initialize(FrameworkElement overlay, TextBlock tbTitle, TextBlock tbText, TextBlock tbQuestion, Button btnPrimary, Button btnSecondary)
{
_overlay = overlay;
- _opacityProperty = opacityProperty;
+ _tbTitle = tbTitle;
+ _tbText = tbText;
+ _tbQuestion = tbQuestion;
_btnPrimary = btnPrimary;
_btnSecondary = btnSecondary;
- _onPrimary = onPrimary;
- _onSecondary = onSecondary;
}
- internal async Task<bool> Show()
+ internal static async Task<bool?> Show(string titleKey, string textKey, string questionKey, string btnPrimaryKey, string btnSecondaryKey)
{
- TaskCompletionSource<bool> tcs = new TaskCompletionSource<bool>();
-
- void PrimaryHandler(object s, RoutedEventArgs e)
+ if (_overlay != null)
{
- tcs.TrySetResult(true);
- _onPrimary?.Invoke();
- Detach();
- }
- void SecondaryHandler(object s, RoutedEventArgs e)
- {
- tcs.TrySetResult(false);
- _onSecondary?.Invoke();
- Detach();
- }
+ Close();
- void Detach()
- {
- _btnPrimary.PreviewMouseLeftButtonDown -= PrimaryHandler;
- _btnSecondary.PreviewMouseLeftButtonDown -= SecondaryHandler;
- }
+ _tbTitle.SetResourceReference(TextBlock.TextProperty, titleKey);
+ _tbText.SetResourceReference(TextBlock.TextProperty, textKey);
+ _tbQuestion.SetResourceReference(TextBlock.TextProperty, questionKey);
+ _btnPrimary.SetResourceReference(ContentControl.ContentProperty, btnPrimaryKey);
+ _btnSecondary.SetResourceReference(ContentControl.ContentProperty, btnSecondaryKey);
+
+ _tcs = new TaskCompletionSource<bool?>();
+
+ static void onPrimary(object s, RoutedEventArgs e) => _tcs?.TrySetResult(true);
+ static void onSecondary(object s, RoutedEventArgs e) => _tcs?.TrySetResult(false);
+
+ _btnPrimary.Click += onPrimary;
+ _btnSecondary.Click += onSecondary;
- _overlay.Visibility = Visibility.Visible;
- _overlay.BeginAnimation(_opacityProperty, FactoryAnimation.CreateIn(0, 1, 0.3));
+ _overlay.Visibility = Visibility.Visible;
+ _overlay.BeginAnimation(UIElement.OpacityProperty, FactoryAnimation.CreateIn(0, 1, 0.3));
- _btnPrimary.PreviewMouseLeftButtonDown += PrimaryHandler;
- _btnSecondary.PreviewMouseLeftButtonDown += SecondaryHandler;
+ bool? result = await _tcs.Task;
- bool result;
- try { result = await tcs.Task; }
- catch (TaskCanceledException) { result = false; }
+ _btnPrimary.Click -= onPrimary;
+ _btnSecondary.Click -= onSecondary;
- _overlay.BeginAnimation(_opacityProperty, FactoryAnimation.CreateTo(0.25, () => { _overlay.Visibility = Visibility.Collapsed; }));
+ Close();
- return result;
+ return result;
+ }
+
+ return null;
+ }
+
+ internal static void Close()
+ {
+ if (_tcs != null && !_tcs.Task.IsCompleted)
+ {
+ _tcs.TrySetResult(null);
+ }
+ else if (_overlay != null && _overlay.Visibility == Visibility.Visible)
+ {
+ _overlay.Visibility = Visibility.Collapsed;
+ }
}
}
-}
+}
\ No newline at end of file
diff --git a/.Source/GTweak/View/InterfaceView.xaml b/.Source/GTweak/View/InterfaceView.xaml
index 4c47d78a..875d6291 100644
--- a/.Source/GTweak/View/InterfaceView.xaml
+++ b/.Source/GTweak/View/InterfaceView.xaml
@@ -78,11 +78,11 @@
<uc:ToggleButton x:Name="TglButton1" Style="{StaticResource ToggleStyle}" StateNA="{Binding [TglButton1].State}" TextResource="{DynamicResource tgl1_intf}" Description="{DynamicResource tgl1_desc_intf}" />
<uc:ToggleButton x:Name="TglButton2" Style="{StaticResource ToggleStyle}" StateNA="{Binding [TglButton2].State}" TextResource="{DynamicResource tgl2_intf}" Description="{DynamicResource tgl2_desc_intf}" />
<uc:ToggleButton x:Name="TglButton3" Style="{StaticResource ToggleStyle}" StateNA="{Binding [TglButton3].State}" TextResource="{DynamicResource tgl3_intf}" Description="{DynamicResource tgl3_desc_intf}" />
- <uc:ToggleButton x:Name="TglButton4" Style="{StaticResource ToggleStyle}" StateNA="{Binding [TglButton4].State}" TextResource="{DynamicResource tgl4_intf}" Description="{DynamicResource tgl4_desc_intf}" />
- <uc:ToggleButton x:Name="TglButton5" Style="{StaticResource ToggleStyle}" StateNA="{Binding [TglButton5].State}" TextResource="{DynamicResource tgl5_intf}" Description="{DynamicResource tgl5_desc_intf}" />
+ <uc:ToggleButton x:Name="TglButton4" IsEnabled="{Binding IsBlockWithoutLicense}" Style="{StaticResource ToggleStyle}" StateNA="{Binding [TglButton4].State}" TextResource="{DynamicResource tgl4_intf}" Description="{DynamicResource tgl4_desc_intf}" />
+ <uc:ToggleButton x:Name="TglButton5" IsEnabled="{Binding IsBlockWithoutLicense}" Style="{StaticResource ToggleStyle}" StateNA="{Binding [TglButton5].State}" TextResource="{DynamicResource tgl5_intf}" Description="{DynamicResource tgl5_desc_intf}" />
<uc:ToggleButton x:Name="TglButton6" IsEnabled="{Binding IsBlockWithoutLicense}" Style="{StaticResource ToggleStyle}" StateNA="{Binding [TglButton6].State}" TextResource="{DynamicResource tgl6_intf}" Description="{DynamicResource tgl6_desc_intf}" />
- <uc:ToggleButton x:Name="TglButton7" IsEnabled="{Binding IsBlockWithoutLicense}" Style="{StaticResource ToggleStyle}" StateNA="{Binding [TglButton7].State}" TextResource="{DynamicResource tgl7_intf}" Description="{DynamicResource tgl7_desc_intf}" />
- <uc:ToggleButton x:Name="TglButton8" IsEnabled="{Binding IsBlockWithoutLicense}" Style="{StaticResource ToggleStyle}" StateNA="{Binding [TglButton8].State}" TextResource="{DynamicResource tgl8_intf}" Description="{DynamicResource tgl8_desc_intf}" />
+ <uc:ToggleButton x:Name="TglButton7" Style="{StaticResource ToggleStyle}" StateNA="{Binding [TglButton7].State}" TextResource="{DynamicResource tgl7_intf}" Description="{DynamicResource tgl7_desc_intf}" />
+ <uc:ToggleButton x:Name="TglButton8" Style="{StaticResource ToggleStyle}" StateNA="{Binding [TglButton8].State}" TextResource="{DynamicResource tgl8_intf}" Description="{DynamicResource tgl8_desc_intf}" />
<uc:ToggleButton x:Name="TglButton9" Style="{StaticResource ToggleStyle}" StateNA="{Binding [TglButton9].State}" TextResource="{DynamicResource tgl9_intf}" Description="{DynamicResource tgl9_desc_intf}" />
<uc:ToggleButton x:Name="TglButton10" Style="{StaticResource ToggleStyle}" StateNA="{Binding [TglButton10].State}" TextResource="{DynamicResource tgl10_intf}" Description="{DynamicResource tgl10_desc_intf}" />
<uc:ToggleButton x:Name="TglButton11" Style="{StaticResource ToggleStyle}" StateNA="{Binding [TglButton11].State}" TextResource="{DynamicResource tgl11_intf}" Description="{DynamicResource tgl11_desc_intf}" />
diff --git a/.Source/GTweak/View/PackagesView.xaml b/.Source/GTweak/View/PackagesView.xaml
index f01616ba..d7bd03e6 100644
--- a/.Source/GTweak/View/PackagesView.xaml
+++ b/.Source/GTweak/View/PackagesView.xaml
@@ -20,126 +20,103 @@
</UserControl.Resources>
<Grid>
- <Grid x:Name="Overlay" Panel.ZIndex="1" Visibility="Collapsed">
- <Grid Background="{StaticResource Brush_Background}" Opacity="0.9"/>
- <ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
- <Grid HorizontalAlignment="Center" VerticalAlignment="Top" Height="auto" Width="auto" Margin="0,100,0,0">
- <StackPanel Orientation="Vertical">
- <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
- <ui:SymbolIcon Symbol="Warning24" FontSize="20px" Foreground="{StaticResource Brush_Accent}" Margin="0,0,0,0" HorizontalAlignment="Center"/>
- <TextBlock Text="{DynamicResource title_over_pkg}" Style="{StaticResource TextDefault}" Foreground="{StaticResource Brush_Highlighted}" FontSize="20px" Margin="5,0,0,0"/>
- </StackPanel>
- <TextBlock Margin="0,10,0,0" Text="{DynamicResource text_over_pkg}" Style="{StaticResource TextDefault}" MaxWidth="700" Foreground="{DynamicResource Brush_TextBlock_Inactivity}" FontSize="16px" TextAlignment="Center" TextWrapping="Wrap" TextTrimming="CharacterEllipsis"/>
- <TextBlock Margin="0,10,0,0" Text="{DynamicResource question_over_pkg}" Style="{StaticResource TextDefault}" MaxWidth="700" Foreground="{DynamicResource Brush_Accent}" FontSize="16px" TextAlignment="Center" TextWrapping="Wrap" TextTrimming="CharacterEllipsis"/>
+ <Grid.RowDefinitions>
+ <RowDefinition Height="auto" />
+ <RowDefinition Height="*" />
+ <RowDefinition Height="100" />
+ </Grid.RowDefinitions>
- <StackPanel Margin="0,20,0,0" HorizontalAlignment="Center" Orientation="Horizontal">
- <Button x:Name="BtnDelete" Content="{DynamicResource btn_delete_all}" Style="{StaticResource ButtonContent}" HorizontalAlignment="Left" VerticalAlignment="Top" MinWidth="120"/>
- <Button Margin="50,0,0,0" x:Name="BtnCancel" Content="{DynamicResource btn_keep_webview}" Style="{StaticResource ButtonContent_Inverted}" HorizontalAlignment="Right" VerticalAlignment="Top" MinWidth="120"/>
- </StackPanel>
- </StackPanel>
- </Grid>
- </ScrollViewer>
- </Grid>
-
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="auto" />
- <RowDefinition Height="*" />
- <RowDefinition Height="100" />
- </Grid.RowDefinitions>
-
- <Grid Grid.Row="0">
- <TextBlock Margin="5" Width="Auto" Height="auto" TextAlignment="Center" FontFamily="{StaticResource Jura}" FontSize="13pt" Foreground="{StaticResource Brush_TextBlock_Inactivity}" HorizontalAlignment="Center" VerticalAlignment="Center" KeyboardNavigation.IsTabStop="False" TextWrapping="Wrap" TextTrimming="CharacterEllipsis">
+ <Grid Grid.Row="0">
+ <TextBlock Margin="5" Width="Auto" Height="auto" TextAlignment="Center" FontFamily="{StaticResource Jura}" FontSize="13pt" Foreground="{StaticResource Brush_TextBlock_Inactivity}" HorizontalAlignment="Center" VerticalAlignment="Center" KeyboardNavigation.IsTabStop="False" TextWrapping="Wrap" TextTrimming="CharacterEllipsis">
<Run Text="{DynamicResource warn_part1_pkg}"/>
<Run Text="{DynamicResource warn_part2_pkg}" Foreground="{StaticResource Brush_Accent}"/>
<Run Text="{DynamicResource warn_part3_pkg}"/>
- </TextBlock>
- </Grid>
+ </TextBlock>
+ </Grid>
- <Grid Grid.Row="1">
- <ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
- <uc:FlowPanel UseMasonryLayout="False" HorizontalSpacing="30" Margin="10,10,10,10" HorizontalAlignment="Center" VerticalAlignment="Top">
+ <Grid Grid.Row="1">
+ <ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
+ <uc:FlowPanel UseMasonryLayout="False" HorizontalSpacing="30" Margin="10,10,10,10" HorizontalAlignment="Center" VerticalAlignment="Top">
+
+ <ToggleButton x:Name="MicrosoftStore" IsChecked="{Binding [MicrosoftStore].Installed}" IsEnabled="{Binding [MicrosoftStore].IsUnavailable}" ToolTip="{DynamicResource MicrosoftStore_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_MicrosoftStore}"/>
+ <ToggleButton x:Name="Xbox" IsChecked="{Binding [Xbox].Installed}" IsEnabled="{Binding [Xbox].IsUnavailable}" ToolTip="{DynamicResource Xbox_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Xbox}"/>
+ <ToggleButton x:Name="OneDrive" IsChecked="{Binding [OneDrive].Installed}" IsEnabled="{Binding [OneDrive].IsUnavailable}" ToolTip="{DynamicResource OneDrive_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_OneDrive}"/>
+ <ToggleButton x:Name="Photos" IsChecked="{Binding [Photos].Installed}" IsEnabled="{Binding [Photos].IsUnavailable}" ToolTip="{DynamicResource Photos_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Photos}"/>
+ <ToggleButton x:Name="Music" IsChecked="{Binding [Music].Installed}" IsEnabled="{Binding [Music].IsUnavailable}" ToolTip="{DynamicResource Music_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Music}"/>
+ <ToggleButton x:Name="ScreenSketch" IsChecked="{Binding [ScreenSketch].Installed}" IsEnabled="{Binding [ScreenSketch].IsUnavailable}" ToolTip="{DynamicResource ScreenSketch_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_ScreenSketch}"/>
+ <ToggleButton x:Name="WindowsTerminal" IsChecked="{Binding [WindowsTerminal].Installed}" IsEnabled="{Binding [WindowsTerminal].IsUnavailable}" ToolTip="{DynamicResource WindowsTerminal_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Terminal}"/>
+ <ToggleButton x:Name="ClipChamp" IsChecked="{Binding [ClipChamp].Installed}" IsEnabled="{Binding [ClipChamp].IsUnavailable}" ToolTip="{DynamicResource ClipChamp_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Clipchamp}"/>
+ <ToggleButton x:Name="BingNews" IsChecked="{Binding [BingNews].Installed}" IsEnabled="{Binding [BingNews].IsUnavailable}" ToolTip="{DynamicResource BingNews_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_BingNews}"/>
+ <ToggleButton x:Name="Edge" IsChecked="{Binding [Edge].Installed}" IsEnabled="{Binding [Edge].IsUnavailable}" ToolTip="{DynamicResource Edge_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Edge}"/>
+ <ToggleButton x:Name="Cortana" IsChecked="{Binding [Cortana].Installed}" IsEnabled="{Binding [Cortana].IsUnavailable}" ToolTip="{DynamicResource Cortana_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Cortana}"/>
+ <ToggleButton x:Name="FeedbackHub" IsChecked="{Binding [FeedbackHub].Installed}" IsEnabled="{Binding [FeedbackHub].IsUnavailable}" ToolTip="{DynamicResource FeedbackHub_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_FeedbackHub}"/>
+ <ToggleButton x:Name="GetHelp" IsChecked="{Binding [GetHelp].Installed}" IsEnabled="{Binding [GetHelp].IsUnavailable}" ToolTip="{DynamicResource GetHelp_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_GetHelp}"/>
+ <ToggleButton x:Name="LinkedIn" IsChecked="{Binding [LinkedIn].Installed}" IsEnabled="{Binding [LinkedIn].IsUnavailable}" ToolTip="{DynamicResource LinkedIn_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Linkedin}"/>
+ <ToggleButton x:Name="Mail" IsChecked="{Binding [Mail].Installed}" IsEnabled="{Binding [Mail].IsUnavailable}" ToolTip="{DynamicResource Mail_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Mail}"/>
+ <ToggleButton x:Name="Maps" IsChecked="{Binding [Maps].Installed}" IsEnabled="{Binding [Maps].IsUnavailable}" ToolTip="{DynamicResource Maps_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Maps}"/>
+ <ToggleButton x:Name="Microsoft3D" IsChecked="{Binding [Microsoft3D].Installed}" IsEnabled="{Binding [Microsoft3D].IsUnavailable}" ToolTip="{DynamicResource Microsoft3D_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Microsoft3DViewer}"/>
+ <ToggleButton x:Name="MicrosoftFamily" IsChecked="{Binding [MicrosoftFamily].Installed}" IsEnabled="{Binding [MicrosoftFamily].IsUnavailable}" ToolTip="{DynamicResource MicrosoftFamily_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_MicrosoftFamilySafety}"/>
+ <ToggleButton x:Name="MicrosoftOfficeHub" IsChecked="{Binding [MicrosoftOfficeHub].Installed}" IsEnabled="{Binding [MicrosoftOfficeHub].IsUnavailable}" ToolTip="{DynamicResource MicrosoftOfficeHub_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_MicrosoftOfficeHub}"/>
+ <ToggleButton x:Name="PowerAutomateDesktop" IsChecked="{Binding [PowerAutomateDesktop].Installed}" IsEnabled="{Binding [PowerAutomateDesktop].IsUnavailable}" ToolTip="{DynamicResource PowerAutomateDesktop_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_MicrosoftPowerAutomate}"/>
+ <ToggleButton x:Name="MicrosoftSolitaireCollection" IsChecked="{Binding [MicrosoftSolitaireCollection].Installed}" IsEnabled="{Binding [MicrosoftSolitaireCollection].IsUnavailable}" ToolTip="{DynamicResource MicrosoftSolitaireCollection_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_MicrosoftSolitaireCollection}"/>
+ <ToggleButton x:Name="MicrosoftStickyNotes" IsChecked="{Binding [MicrosoftStickyNotes].Installed}" IsEnabled="{Binding [MicrosoftStickyNotes].IsUnavailable}" ToolTip="{DynamicResource MicrosoftStickyNotes_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_MicrosoftStickyNotes}"/>
+ <ToggleButton x:Name="Alarms" IsChecked="{Binding [Alarms].Installed}" IsEnabled="{Binding [Alarms].IsUnavailable}" ToolTip="{DynamicResource Alarms_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Alarms}"/>
+ <ToggleButton x:Name="MicrosoftTeams" IsChecked="{Binding [MicrosoftTeams].Installed}" IsEnabled="{Binding [MicrosoftTeams].IsUnavailable}" ToolTip="{DynamicResource MicrosoftTeams_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_MicrosoftTeams}"/>
+ <ToggleButton x:Name="SkypeApp" IsChecked="{Binding [SkypeApp].Installed}" IsEnabled="{Binding [SkypeApp].IsUnavailable}" ToolTip="{DynamicResource SkypeApp_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_SkypeApp}"/>
+ <ToggleButton x:Name="Camera" IsChecked="{Binding [Camera].Installed}" IsEnabled="{Binding [Camera].IsUnavailable}" ToolTip="{DynamicResource Camera_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Camera}"/>
+ <ToggleButton x:Name="Messaging" IsChecked="{Binding [Messaging].Installed}" IsEnabled="{Binding [Messaging].IsUnavailable}" ToolTip="{DynamicResource Messaging_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Messaging}"/>
+ <ToggleButton x:Name="BingSports" IsChecked="{Binding [BingSports].Installed}" IsEnabled="{Binding [BingSports].IsUnavailable}" ToolTip="{DynamicResource BingSports_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_BingSports}"/>
+ <ToggleButton x:Name="BingFinance" IsChecked="{Binding [BingFinance].Installed}" IsEnabled="{Binding [BingFinance].IsUnavailable}" ToolTip="{DynamicResource BingFinance_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_BingFinance}"/>
+ <ToggleButton x:Name="OneNote" IsChecked="{Binding [OneNote].Installed}" IsEnabled="{Binding [OneNote].IsUnavailable}" ToolTip="{DynamicResource OneNote_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_OneNote}"/>
+ <ToggleButton x:Name="Outlook" IsChecked="{Binding [Outlook].Installed}" IsEnabled="{Binding [Outlook].IsUnavailable}" ToolTip="{DynamicResource Outlook_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Outlook}"/>
+ <ToggleButton x:Name="Paint3D" IsChecked="{Binding [Paint3D].Installed}" IsEnabled="{Binding [Paint3D].IsUnavailable}" ToolTip="{DynamicResource Paint3D_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Paint3D}"/>
+ <ToggleButton x:Name="People" IsChecked="{Binding [People].Installed}" IsEnabled="{Binding [People].IsUnavailable}" ToolTip="{DynamicResource People_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_People}"/>
+ <ToggleButton x:Name="Phone" IsChecked="{Binding [Phone].Installed}" IsEnabled="{Binding [Phone].IsUnavailable}" ToolTip="{DynamicResource Phone_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Phone}"/>
+ <ToggleButton x:Name="BingSearch" IsChecked="{Binding [BingSearch].Installed}" IsEnabled="{Binding [BingSearch].IsUnavailable}" ToolTip="{DynamicResource BingSearch_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_BingSearch}"/>
+ <ToggleButton x:Name="QuickAssist" IsChecked="{Binding [QuickAssist].Installed}" IsEnabled="{Binding [QuickAssist].IsUnavailable}" ToolTip="{DynamicResource QuickAssist_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_QuickAssist}"/>
+ <ToggleButton x:Name="BingWeather" IsChecked="{Binding [BingWeather].Installed}" IsEnabled="{Binding [BingWeather].IsUnavailable}" ToolTip="{DynamicResource BingWeather_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_BingWeather}"/>
+ <ToggleButton x:Name="MixedReality" IsChecked="{Binding [MixedReality].Installed}" IsEnabled="{Binding [MixedReality].IsUnavailable}" ToolTip="{DynamicResource MixedReality_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_MixedReality}"/>
+ <ToggleButton x:Name="SoundRecorder" IsChecked="{Binding [SoundRecorder].Installed}" IsEnabled="{Binding [SoundRecorder].IsUnavailable}" ToolTip="{DynamicResource SoundRecorder_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_SoundRecorder}"/>
+ <ToggleButton x:Name="WebMediaExtensions" IsChecked="{Binding [WebMediaExtensions].Installed}" IsEnabled="{Binding [WebMediaExtensions].IsUnavailable}" ToolTip="{DynamicResource WebMediaExtensions_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_WebMediaExtensions}"/>
+ <ToggleButton x:Name="Todos" IsChecked="{Binding [Todos].Installed}" IsEnabled="{Binding [Todos].IsUnavailable}" ToolTip="{DynamicResource Todos_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Todos}"/>
+ <ToggleButton x:Name="Video" IsChecked="{Binding [Video].Installed}" IsEnabled="{Binding [Video].IsUnavailable}" ToolTip="{DynamicResource Video_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Video}"/>
+ <ToggleButton x:Name="OneConnect" IsChecked="{Binding [OneConnect].Installed}" IsEnabled="{Binding [OneConnect].IsUnavailable}" ToolTip="{DynamicResource OneConnect_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_MobilePlanOneConnect}"/>
+ <ToggleButton x:Name="Widgets" IsChecked="{Binding [Widgets].Installed}" IsEnabled="{Binding [Widgets].IsUnavailable}" ToolTip="{DynamicResource Widgets_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Widgets}"/>
+ <ToggleButton x:Name="DevHome" IsChecked="{Binding [DevHome].Installed}" IsEnabled="{Binding [DevHome].IsUnavailable}" ToolTip="{DynamicResource DevHome_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_DevHome}"/>
+ <ToggleButton x:Name="Calculator" IsChecked="{Binding [Calculator].Installed}" IsEnabled="{Binding [Calculator].IsUnavailable}" ToolTip="{DynamicResource Calculator_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Calculator}" Visibility="{Binding Win11FeatureOnly}"/>
+ <ToggleButton x:Name="Notepad" IsChecked="{Binding [Notepad].Installed}" IsEnabled="{Binding [Notepad].IsUnavailable}" ToolTip="{DynamicResource Notepad_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Notepad}" Visibility="{Binding Win11FeatureOnly}"/>
+ <ToggleButton x:Name="Paint" IsChecked="{Binding [Paint].Installed}" IsEnabled="{Binding [Paint].IsUnavailable}" ToolTip="{DynamicResource Paint_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Paint}" Visibility="{Binding Win11FeatureOnly}"/>
+ <ToggleButton x:Name="Copilot" IsChecked="{Binding [Copilot].Installed}" IsEnabled="{Binding [Copilot].IsUnavailable}" ToolTip="{DynamicResource Copilot_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Copilot}"/>
+ <ToggleButton x:Name="Whiteboard" IsChecked="{Binding [Whiteboard].Installed}" IsEnabled="{Binding [Whiteboard].IsUnavailable}" ToolTip="{DynamicResource Whiteboard_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_WhiteBoard}"/>
+ <ToggleButton x:Name="Wallet" IsChecked="{Binding [Wallet].Installed}" IsEnabled="{Binding [Wallet].IsUnavailable}" ToolTip="{DynamicResource Wallet_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Wallet}"/>
+ <ToggleButton x:Name="Builder3D" IsChecked="{Binding [Builder3D].Installed}" IsEnabled="{Binding [Builder3D].IsUnavailable}" ToolTip="{DynamicResource Builder3D_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_3DBuilder}"/>
+ <ToggleButton x:Name="MicrosoftSway" IsChecked="{Binding [MicrosoftSway].Installed}" IsEnabled="{Binding [MicrosoftSway].IsUnavailable}" ToolTip="{DynamicResource MicrosoftSway_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_MicrosoftSway}"/>
+ <ToggleButton x:Name="Spotify" IsChecked="{Binding [Spotify].Installed}" IsEnabled="{Binding [Spotify].IsUnavailable}" ToolTip="{DynamicResource Spotify_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Spotify}"/>
+ <ToggleButton x:Name="YandexMusic" IsChecked="{Binding [YandexMusic].Installed}" IsEnabled="{Binding [YandexMusic].IsUnavailable}" ToolTip="{DynamicResource YandexMusic_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_YandexMusic}"/>
+ <ToggleButton x:Name="WhatsApp" IsChecked="{Binding [WhatsApp].Installed}" IsEnabled="{Binding [WhatsApp].IsUnavailable}" ToolTip="{DynamicResource WhatsApp_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_WhatsApp}"/>
+ <ToggleButton x:Name="Facebook" IsChecked="{Binding [Facebook].Installed}" IsEnabled="{Binding [Facebook].IsUnavailable}" ToolTip="{DynamicResource Facebook_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Facebook}"/>
+ <ToggleButton x:Name="Hulu" IsChecked="{Binding [Hulu].Installed}" IsEnabled="{Binding [Hulu].IsUnavailable}" ToolTip="{DynamicResource Hulu_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Hulu}"/>
+ <ToggleButton x:Name="Disney" IsChecked="{Binding [Disney].Installed}" IsEnabled="{Binding [Disney].IsUnavailable}" ToolTip="{DynamicResource Disney_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Disney}"/>
+ <ToggleButton x:Name="Instagram" IsChecked="{Binding [Instagram].Installed}" IsEnabled="{Binding [Instagram].IsUnavailable}" ToolTip="{DynamicResource Instagram_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Instagram}"/>
+ <ToggleButton x:Name="Twitter" IsChecked="{Binding [TwitterX].Installed}" IsEnabled="{Binding [TwitterX].IsUnavailable}" ToolTip="{DynamicResource TwitterX_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_TwitterX}"/>
+ <ToggleButton x:Name="TikTok" IsChecked="{Binding [TikTok].Installed}" IsEnabled="{Binding [TikTok].IsUnavailable}" ToolTip="{DynamicResource TikTok_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_TikTok}"/>
+ <ToggleButton x:Name="Netflix" IsChecked="{Binding [Netflix].Installed}" IsEnabled="{Binding [Netflix].IsUnavailable}" ToolTip="{DynamicResource Netflix_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Netflix}"/>
+ <ToggleButton x:Name="Viber" IsChecked="{Binding [Viber].Installed}" IsEnabled="{Binding [Viber].IsUnavailable}" ToolTip="{DynamicResource Viber_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Viber}"/>
+ <ToggleButton x:Name="Picsart" IsChecked="{Binding [Picsart].Installed}" IsEnabled="{Binding [Picsart].IsUnavailable}" ToolTip="{DynamicResource Picsart_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Picsart}"/>
+ <ToggleButton x:Name="PrimeVideo" IsChecked="{Binding [PrimeVideo].Installed}" IsEnabled="{Binding [PrimeVideo].IsUnavailable}" ToolTip="{DynamicResource PrimeVideo_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_PrimeVideo}"/>
+ <ToggleButton x:Name="TuneInRadio" IsChecked="{Binding [TuneInRadio].Installed}" IsEnabled="{Binding [TuneInRadio].IsUnavailable}" ToolTip="{DynamicResource TuneInRadio_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_TuneInRadio}"/>
+ <ToggleButton x:Name="iHeartRadio" IsChecked="{Binding [iHeartRadio].Installed}" IsEnabled="{Binding [iHeartRadio].IsUnavailable}" ToolTip="{DynamicResource iHeartRadio_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_iHeartRadio}"/>
+ <ToggleButton x:Name="Shazam" IsChecked="{Binding [Shazam].Installed}" IsEnabled="{Binding [Shazam].IsUnavailable}" ToolTip="{DynamicResource Shazam_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Shazam}"/>
+ <ToggleButton x:Name="Plex" IsChecked="{Binding [Plex].Installed}" IsEnabled="{Binding [Plex].IsUnavailable}" ToolTip="{DynamicResource Plex_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Plex}"/>
+ <ToggleButton x:Name="Pandora" IsChecked="{Binding [Pandora].Installed}" IsEnabled="{Binding [Pandora].IsUnavailable}" ToolTip="{DynamicResource Pandora_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Pandora}"/>
+ <ToggleButton x:Name="DolbyAccess" IsChecked="{Binding [DolbyAccess].Installed}" IsEnabled="{Binding [DolbyAccess].IsUnavailable}" ToolTip="{DynamicResource DolbyAccess_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_DolbyAccess}"/>
- <ToggleButton x:Name="MicrosoftStore" IsChecked="{Binding [MicrosoftStore].Installed}" IsEnabled="{Binding [MicrosoftStore].IsUnavailable}" ToolTip="{DynamicResource MicrosoftStore_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_MicrosoftStore}"/>
- <ToggleButton x:Name="Xbox" IsChecked="{Binding [Xbox].Installed}" IsEnabled="{Binding [Xbox].IsUnavailable}" ToolTip="{DynamicResource Xbox_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Xbox}"/>
- <ToggleButton x:Name="OneDrive" IsChecked="{Binding [OneDrive].Installed}" IsEnabled="{Binding [OneDrive].IsUnavailable}" ToolTip="{DynamicResource OneDrive_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_OneDrive}"/>
- <ToggleButton x:Name="Photos" IsChecked="{Binding [Photos].Installed}" IsEnabled="{Binding [Photos].IsUnavailable}" ToolTip="{DynamicResource Photos_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Photos}"/>
- <ToggleButton x:Name="Music" IsChecked="{Binding [Music].Installed}" IsEnabled="{Binding [Music].IsUnavailable}" ToolTip="{DynamicResource Music_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Music}"/>
- <ToggleButton x:Name="ScreenSketch" IsChecked="{Binding [ScreenSketch].Installed}" IsEnabled="{Binding [ScreenSketch].IsUnavailable}" ToolTip="{DynamicResource ScreenSketch_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_ScreenSketch}"/>
- <ToggleButton x:Name="WindowsTerminal" IsChecked="{Binding [WindowsTerminal].Installed}" IsEnabled="{Binding [WindowsTerminal].IsUnavailable}" ToolTip="{DynamicResource WindowsTerminal_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Terminal}"/>
- <ToggleButton x:Name="ClipChamp" IsChecked="{Binding [ClipChamp].Installed}" IsEnabled="{Binding [ClipChamp].IsUnavailable}" ToolTip="{DynamicResource ClipChamp_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Clipchamp}"/>
- <ToggleButton x:Name="BingNews" IsChecked="{Binding [BingNews].Installed}" IsEnabled="{Binding [BingNews].IsUnavailable}" ToolTip="{DynamicResource BingNews_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_BingNews}"/>
- <ToggleButton x:Name="Edge" IsChecked="{Binding [Edge].Installed}" IsEnabled="{Binding [Edge].IsUnavailable}" ToolTip="{DynamicResource Edge_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Edge}"/>
- <ToggleButton x:Name="Cortana" IsChecked="{Binding [Cortana].Installed}" IsEnabled="{Binding [Cortana].IsUnavailable}" ToolTip="{DynamicResource Cortana_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Cortana}"/>
- <ToggleButton x:Name="FeedbackHub" IsChecked="{Binding [FeedbackHub].Installed}" IsEnabled="{Binding [FeedbackHub].IsUnavailable}" ToolTip="{DynamicResource FeedbackHub_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_FeedbackHub}"/>
- <ToggleButton x:Name="GetHelp" IsChecked="{Binding [GetHelp].Installed}" IsEnabled="{Binding [GetHelp].IsUnavailable}" ToolTip="{DynamicResource GetHelp_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_GetHelp}"/>
- <ToggleButton x:Name="LinkedIn" IsChecked="{Binding [LinkedIn].Installed}" IsEnabled="{Binding [LinkedIn].IsUnavailable}" ToolTip="{DynamicResource LinkedIn_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Linkedin}"/>
- <ToggleButton x:Name="Mail" IsChecked="{Binding [Mail].Installed}" IsEnabled="{Binding [Mail].IsUnavailable}" ToolTip="{DynamicResource Mail_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Mail}"/>
- <ToggleButton x:Name="Maps" IsChecked="{Binding [Maps].Installed}" IsEnabled="{Binding [Maps].IsUnavailable}" ToolTip="{DynamicResource Maps_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Maps}"/>
- <ToggleButton x:Name="Microsoft3D" IsChecked="{Binding [Microsoft3D].Installed}" IsEnabled="{Binding [Microsoft3D].IsUnavailable}" ToolTip="{DynamicResource Microsoft3D_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Microsoft3DViewer}"/>
- <ToggleButton x:Name="MicrosoftFamily" IsChecked="{Binding [MicrosoftFamily].Installed}" IsEnabled="{Binding [MicrosoftFamily].IsUnavailable}" ToolTip="{DynamicResource MicrosoftFamily_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_MicrosoftFamilySafety}"/>
- <ToggleButton x:Name="MicrosoftOfficeHub" IsChecked="{Binding [MicrosoftOfficeHub].Installed}" IsEnabled="{Binding [MicrosoftOfficeHub].IsUnavailable}" ToolTip="{DynamicResource MicrosoftOfficeHub_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_MicrosoftOfficeHub}"/>
- <ToggleButton x:Name="PowerAutomateDesktop" IsChecked="{Binding [PowerAutomateDesktop].Installed}" IsEnabled="{Binding [PowerAutomateDesktop].IsUnavailable}" ToolTip="{DynamicResource PowerAutomateDesktop_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_MicrosoftPowerAutomate}"/>
- <ToggleButton x:Name="MicrosoftSolitaireCollection" IsChecked="{Binding [MicrosoftSolitaireCollection].Installed}" IsEnabled="{Binding [MicrosoftSolitaireCollection].IsUnavailable}" ToolTip="{DynamicResource MicrosoftSolitaireCollection_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_MicrosoftSolitaireCollection}"/>
- <ToggleButton x:Name="MicrosoftStickyNotes" IsChecked="{Binding [MicrosoftStickyNotes].Installed}" IsEnabled="{Binding [MicrosoftStickyNotes].IsUnavailable}" ToolTip="{DynamicResource MicrosoftStickyNotes_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_MicrosoftStickyNotes}"/>
- <ToggleButton x:Name="Alarms" IsChecked="{Binding [Alarms].Installed}" IsEnabled="{Binding [Alarms].IsUnavailable}" ToolTip="{DynamicResource Alarms_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Alarms}"/>
- <ToggleButton x:Name="MicrosoftTeams" IsChecked="{Binding [MicrosoftTeams].Installed}" IsEnabled="{Binding [MicrosoftTeams].IsUnavailable}" ToolTip="{DynamicResource MicrosoftTeams_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_MicrosoftTeams}"/>
- <ToggleButton x:Name="SkypeApp" IsChecked="{Binding [SkypeApp].Installed}" IsEnabled="{Binding [SkypeApp].IsUnavailable}" ToolTip="{DynamicResource SkypeApp_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_SkypeApp}"/>
- <ToggleButton x:Name="Camera" IsChecked="{Binding [Camera].Installed}" IsEnabled="{Binding [Camera].IsUnavailable}" ToolTip="{DynamicResource Camera_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Camera}"/>
- <ToggleButton x:Name="Messaging" IsChecked="{Binding [Messaging].Installed}" IsEnabled="{Binding [Messaging].IsUnavailable}" ToolTip="{DynamicResource Messaging_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Messaging}"/>
- <ToggleButton x:Name="BingSports" IsChecked="{Binding [BingSports].Installed}" IsEnabled="{Binding [BingSports].IsUnavailable}" ToolTip="{DynamicResource BingSports_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_BingSports}"/>
- <ToggleButton x:Name="BingFinance" IsChecked="{Binding [BingFinance].Installed}" IsEnabled="{Binding [BingFinance].IsUnavailable}" ToolTip="{DynamicResource BingFinance_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_BingFinance}"/>
- <ToggleButton x:Name="OneNote" IsChecked="{Binding [OneNote].Installed}" IsEnabled="{Binding [OneNote].IsUnavailable}" ToolTip="{DynamicResource OneNote_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_OneNote}"/>
- <ToggleButton x:Name="Outlook" IsChecked="{Binding [Outlook].Installed}" IsEnabled="{Binding [Outlook].IsUnavailable}" ToolTip="{DynamicResource Outlook_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Outlook}"/>
- <ToggleButton x:Name="Paint3D" IsChecked="{Binding [Paint3D].Installed}" IsEnabled="{Binding [Paint3D].IsUnavailable}" ToolTip="{DynamicResource Paint3D_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Paint3D}"/>
- <ToggleButton x:Name="People" IsChecked="{Binding [People].Installed}" IsEnabled="{Binding [People].IsUnavailable}" ToolTip="{DynamicResource People_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_People}"/>
- <ToggleButton x:Name="Phone" IsChecked="{Binding [Phone].Installed}" IsEnabled="{Binding [Phone].IsUnavailable}" ToolTip="{DynamicResource Phone_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Phone}"/>
- <ToggleButton x:Name="BingSearch" IsChecked="{Binding [BingSearch].Installed}" IsEnabled="{Binding [BingSearch].IsUnavailable}" ToolTip="{DynamicResource BingSearch_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_BingSearch}"/>
- <ToggleButton x:Name="QuickAssist" IsChecked="{Binding [QuickAssist].Installed}" IsEnabled="{Binding [QuickAssist].IsUnavailable}" ToolTip="{DynamicResource QuickAssist_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_QuickAssist}"/>
- <ToggleButton x:Name="BingWeather" IsChecked="{Binding [BingWeather].Installed}" IsEnabled="{Binding [BingWeather].IsUnavailable}" ToolTip="{DynamicResource BingWeather_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_BingWeather}"/>
- <ToggleButton x:Name="MixedReality" IsChecked="{Binding [MixedReality].Installed}" IsEnabled="{Binding [MixedReality].IsUnavailable}" ToolTip="{DynamicResource MixedReality_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_MixedReality}"/>
- <ToggleButton x:Name="SoundRecorder" IsChecked="{Binding [SoundRecorder].Installed}" IsEnabled="{Binding [SoundRecorder].IsUnavailable}" ToolTip="{DynamicResource SoundRecorder_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_SoundRecorder}"/>
- <ToggleButton x:Name="WebMediaExtensions" IsChecked="{Binding [WebMediaExtensions].Installed}" IsEnabled="{Binding [WebMediaExtensions].IsUnavailable}" ToolTip="{DynamicResource WebMediaExtensions_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_WebMediaExtensions}"/>
- <ToggleButton x:Name="Todos" IsChecked="{Binding [Todos].Installed}" IsEnabled="{Binding [Todos].IsUnavailable}" ToolTip="{DynamicResource Todos_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Todos}"/>
- <ToggleButton x:Name="Video" IsChecked="{Binding [Video].Installed}" IsEnabled="{Binding [Video].IsUnavailable}" ToolTip="{DynamicResource Video_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Video}"/>
- <ToggleButton x:Name="OneConnect" IsChecked="{Binding [OneConnect].Installed}" IsEnabled="{Binding [OneConnect].IsUnavailable}" ToolTip="{DynamicResource OneConnect_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_MobilePlanOneConnect}"/>
- <ToggleButton x:Name="Widgets" IsChecked="{Binding [Widgets].Installed}" IsEnabled="{Binding [Widgets].IsUnavailable}" ToolTip="{DynamicResource Widgets_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Widgets}"/>
- <ToggleButton x:Name="DevHome" IsChecked="{Binding [DevHome].Installed}" IsEnabled="{Binding [DevHome].IsUnavailable}" ToolTip="{DynamicResource DevHome_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_DevHome}"/>
- <ToggleButton x:Name="Calculator" IsChecked="{Binding [Calculator].Installed}" IsEnabled="{Binding [Calculator].IsUnavailable}" ToolTip="{DynamicResource Calculator_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Calculator}" Visibility="{Binding Win11FeatureOnly}"/>
- <ToggleButton x:Name="Notepad" IsChecked="{Binding [Notepad].Installed}" IsEnabled="{Binding [Notepad].IsUnavailable}" ToolTip="{DynamicResource Notepad_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Notepad}" Visibility="{Binding Win11FeatureOnly}"/>
- <ToggleButton x:Name="Paint" IsChecked="{Binding [Paint].Installed}" IsEnabled="{Binding [Paint].IsUnavailable}" ToolTip="{DynamicResource Paint_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Paint}" Visibility="{Binding Win11FeatureOnly}"/>
- <ToggleButton x:Name="Copilot" IsChecked="{Binding [Copilot].Installed}" IsEnabled="{Binding [Copilot].IsUnavailable}" ToolTip="{DynamicResource Copilot_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Copilot}"/>
- <ToggleButton x:Name="Whiteboard" IsChecked="{Binding [Whiteboard].Installed}" IsEnabled="{Binding [Whiteboard].IsUnavailable}" ToolTip="{DynamicResource Whiteboard_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_WhiteBoard}"/>
- <ToggleButton x:Name="Wallet" IsChecked="{Binding [Wallet].Installed}" IsEnabled="{Binding [Wallet].IsUnavailable}" ToolTip="{DynamicResource Wallet_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Wallet}"/>
- <ToggleButton x:Name="Builder3D" IsChecked="{Binding [Builder3D].Installed}" IsEnabled="{Binding [Builder3D].IsUnavailable}" ToolTip="{DynamicResource Builder3D_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_3DBuilder}"/>
- <ToggleButton x:Name="MicrosoftSway" IsChecked="{Binding [MicrosoftSway].Installed}" IsEnabled="{Binding [MicrosoftSway].IsUnavailable}" ToolTip="{DynamicResource MicrosoftSway_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_MicrosoftSway}"/>
- <ToggleButton x:Name="Spotify" IsChecked="{Binding [Spotify].Installed}" IsEnabled="{Binding [Spotify].IsUnavailable}" ToolTip="{DynamicResource Spotify_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Spotify}"/>
- <ToggleButton x:Name="YandexMusic" IsChecked="{Binding [YandexMusic].Installed}" IsEnabled="{Binding [YandexMusic].IsUnavailable}" ToolTip="{DynamicResource YandexMusic_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_YandexMusic}"/>
- <ToggleButton x:Name="WhatsApp" IsChecked="{Binding [WhatsApp].Installed}" IsEnabled="{Binding [WhatsApp].IsUnavailable}" ToolTip="{DynamicResource WhatsApp_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_WhatsApp}"/>
- <ToggleButton x:Name="Facebook" IsChecked="{Binding [Facebook].Installed}" IsEnabled="{Binding [Facebook].IsUnavailable}" ToolTip="{DynamicResource Facebook_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Facebook}"/>
- <ToggleButton x:Name="Hulu" IsChecked="{Binding [Hulu].Installed}" IsEnabled="{Binding [Hulu].IsUnavailable}" ToolTip="{DynamicResource Hulu_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Hulu}"/>
- <ToggleButton x:Name="Disney" IsChecked="{Binding [Disney].Installed}" IsEnabled="{Binding [Disney].IsUnavailable}" ToolTip="{DynamicResource Disney_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Disney}"/>
- <ToggleButton x:Name="Instagram" IsChecked="{Binding [Instagram].Installed}" IsEnabled="{Binding [Instagram].IsUnavailable}" ToolTip="{DynamicResource Instagram_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Instagram}"/>
- <ToggleButton x:Name="Twitter" IsChecked="{Binding [TwitterX].Installed}" IsEnabled="{Binding [TwitterX].IsUnavailable}" ToolTip="{DynamicResource TwitterX_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_TwitterX}"/>
- <ToggleButton x:Name="TikTok" IsChecked="{Binding [TikTok].Installed}" IsEnabled="{Binding [TikTok].IsUnavailable}" ToolTip="{DynamicResource TikTok_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_TikTok}"/>
- <ToggleButton x:Name="Netflix" IsChecked="{Binding [Netflix].Installed}" IsEnabled="{Binding [Netflix].IsUnavailable}" ToolTip="{DynamicResource Netflix_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Netflix}"/>
- <ToggleButton x:Name="Viber" IsChecked="{Binding [Viber].Installed}" IsEnabled="{Binding [Viber].IsUnavailable}" ToolTip="{DynamicResource Viber_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Viber}"/>
- <ToggleButton x:Name="Picsart" IsChecked="{Binding [Picsart].Installed}" IsEnabled="{Binding [Picsart].IsUnavailable}" ToolTip="{DynamicResource Picsart_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Picsart}"/>
- <ToggleButton x:Name="PrimeVideo" IsChecked="{Binding [PrimeVideo].Installed}" IsEnabled="{Binding [PrimeVideo].IsUnavailable}" ToolTip="{DynamicResource PrimeVideo_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_PrimeVideo}"/>
- <ToggleButton x:Name="TuneInRadio" IsChecked="{Binding [TuneInRadio].Installed}" IsEnabled="{Binding [TuneInRadio].IsUnavailable}" ToolTip="{DynamicResource TuneInRadio_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_TuneInRadio}"/>
- <ToggleButton x:Name="iHeartRadio" IsChecked="{Binding [iHeartRadio].Installed}" IsEnabled="{Binding [iHeartRadio].IsUnavailable}" ToolTip="{DynamicResource iHeartRadio_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_iHeartRadio}"/>
- <ToggleButton x:Name="Shazam" IsChecked="{Binding [Shazam].Installed}" IsEnabled="{Binding [Shazam].IsUnavailable}" ToolTip="{DynamicResource Shazam_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Shazam}"/>
- <ToggleButton x:Name="Plex" IsChecked="{Binding [Plex].Installed}" IsEnabled="{Binding [Plex].IsUnavailable}" ToolTip="{DynamicResource Plex_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Plex}"/>
- <ToggleButton x:Name="Pandora" IsChecked="{Binding [Pandora].Installed}" IsEnabled="{Binding [Pandora].IsUnavailable}" ToolTip="{DynamicResource Pandora_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Pandora}"/>
- <ToggleButton x:Name="DolbyAccess" IsChecked="{Binding [DolbyAccess].Installed}" IsEnabled="{Binding [DolbyAccess].IsUnavailable}" ToolTip="{DynamicResource DolbyAccess_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_DolbyAccess}"/>
-
- </uc:FlowPanel>
- </ScrollViewer>
- </Grid>
+ </uc:FlowPanel>
+ </ScrollViewer>
+ </Grid>
- <Grid Grid.Row="2">
- <uc:DescriptionBlock VerticalAlignment="Stretch" x:Name="DescBlock" DefaultText="{DynamicResource defaultDescriptionApp}"/>
- </Grid>
+ <Grid Grid.Row="2">
+ <uc:DescriptionBlock VerticalAlignment="Stretch" x:Name="DescBlock" DefaultText="{DynamicResource defaultDescriptionApp}"/>
</Grid>
</Grid>
</UserControl>
diff --git a/.Source/GTweak/View/PackagesView.xaml.cs b/.Source/GTweak/View/PackagesView.xaml.cs
index c4cbf316..a7e7b89c 100644
--- a/.Source/GTweak/View/PackagesView.xaml.cs
+++ b/.Source/GTweak/View/PackagesView.xaml.cs
@@ -18,13 +18,17 @@ namespace GTweak.View
private readonly BackgroundQueue _backgroundQueue = new BackgroundQueue();
private readonly BackgroundWorker backgroundWorker = new BackgroundWorker();
private readonly UninstallingPakages _uninstalling = new UninstallingPakages();
- private bool _isWebViewRemoval = false;
+ private bool? _isWebViewRemoval = false;
public PackagesView()
{
InitializeComponent();
- Unloaded += delegate { _timer.Stop(); };
+ Unloaded += delegate
+ {
+ _timer.Stop();
+ OverlayDialogManager.Close();
+ };
Loaded += delegate
{
backgroundWorker.DoWork += delegate { _uninstalling.GetInstalledPackages(); };
@@ -90,15 +94,19 @@ namespace GTweak.View
{
if (packageName.Equals("Edge"))
{
- OverlayDialogManager overlayDialog = new OverlayDialogManager(Overlay, OpacityProperty, BtnDelete, BtnCancel);
- _isWebViewRemoval = await overlayDialog.Show();
+ _isWebViewRemoval = await OverlayDialogManager.Show("title_over_pkg", "text_over_pkg", "question_over_pkg", "btn_delete_all", "btn_keep_webview");
+
+ if (_isWebViewRemoval == null)
+ {
+ return;
+ }
}
await _backgroundQueue.QueueTask(async () =>
{
await Dispatcher.InvokeAsync(() => { UninstallingPakages.HandleAvailabilityStatus(packageName, true); });
- try { await UninstallingPakages.RemoveAppxPackage(packageName, _isWebViewRemoval); }
+ try { await UninstallingPakages.RemoveAppxPackage(packageName, (bool)_isWebViewRemoval); }
finally { await Dispatcher.InvokeAsync(() => { UninstallingPakages.HandleAvailabilityStatus(packageName, false); }); }
await Dispatcher.BeginInvoke(new Action(() =>
diff --git a/.Source/GTweak/View/SystemView.xaml b/.Source/GTweak/View/SystemView.xaml
index 4f56cba9..a4a4994c 100644
--- a/.Source/GTweak/View/SystemView.xaml
+++ b/.Source/GTweak/View/SystemView.xaml
@@ -30,7 +30,7 @@
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
<uc:FlowPanel VerticalSpacing="20" HorizontalSpacing="5" Margin="10">
- <StackPanel Orientation="Vertical" Margin="0,-20,0,0">
+ <StackPanel Orientation="Vertical" Margin="0,-15,0,0">
<StackPanel Orientation="Horizontal" Height="45" VerticalAlignment="Top" MouseEnter="Tweak_MouseEnter" MouseLeave="Tweak_MouseLeave" ToolTip="{DynamicResource slider1_desc_sys}" ToolTipService.IsEnabled="False" Background="Transparent">
<TextBlock Style="{StaticResource TextDefault}" Margin="0,2,0,0" Text="{DynamicResource slider1_sys}"/>
<Slider x:Name="Slider1" Value="{Binding [Slider1].Value}" Style="{StaticResource Numeric_Slider}" IsSnapToTickEnabled="True" Minimum="0" Maximum="20" Margin="7,15,0,0" Width="150" ValueChanged="Slider_ValueChanged"/>
diff --git a/.Source/GTweak/View/UtilsView.xaml b/.Source/GTweak/View/UtilsView.xaml
index 392df735..7850ef4b 100644
--- a/.Source/GTweak/View/UtilsView.xaml
+++ b/.Source/GTweak/View/UtilsView.xaml
@@ -8,97 +8,72 @@
xmlns:local="clr-namespace:GTweak.View"
mc:Ignorable="d" d:Width="1014" Style="{StaticResource LaunchPage}">
<Grid>
- <Grid x:Name="Overlay" Panel.ZIndex="1" Visibility="Collapsed">
- <Grid Background="{StaticResource Brush_Background}" Opacity="0.9"/>
- <ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
- <Grid HorizontalAlignment="Center" VerticalAlignment="Top" Height="auto" Width="auto" Margin="0,100,0,0">
- <StackPanel Orientation="Vertical">
- <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
- <ui:SymbolIcon Symbol="Warning24" FontSize="20px" Foreground="{StaticResource Brush_Accent}" Margin="0,0,0,0" HorizontalAlignment="Center"/>
- <TextBlock Text="{DynamicResource title_over_more}" Style="{StaticResource TextDefault}" Foreground="{StaticResource Brush_Highlighted}" FontSize="20px" Margin="5,0,0,0"/>
- </StackPanel>
- <TextBlock Margin="0,10,0,0" Text="{DynamicResource text_over_more}" Style="{StaticResource TextDefault}" MaxWidth="700" Foreground="{DynamicResource Brush_TextBlock_Inactivity}" FontSize="16px" TextAlignment="Center" TextWrapping="Wrap" TextTrimming="CharacterEllipsis"/>
- <TextBlock Margin="0,10,0,0" Text="{DynamicResource question_over_more}" Style="{StaticResource TextDefault}" MaxWidth="700" Foreground="{DynamicResource Brush_Accent}" FontSize="16px" TextAlignment="Center" TextWrapping="Wrap" TextTrimming="CharacterEllipsis"/>
+ <Grid.RowDefinitions>
+ <RowDefinition Height="auto" />
+ <RowDefinition Height="*" />
+ </Grid.RowDefinitions>
- <StackPanel Margin="0,20,0,0" HorizontalAlignment="Center" Orientation="Horizontal">
- <Button x:Name="BtnAgree" Content="{DynamicResource btn_agree}" Style="{StaticResource ButtonContent}" HorizontalAlignment="Left" VerticalAlignment="Top" MinWidth="120"/>
- <Button Margin="50,0,0,0" x:Name="BtnDecline" Content="{DynamicResource btn_decline}" Style="{StaticResource ButtonContent_Inverted}" HorizontalAlignment="Right" VerticalAlignment="Top" MinWidth="120"/>
- </StackPanel>
- </StackPanel>
- </Grid>
- </ScrollViewer>
+ <Grid Grid.Row="0">
+ <TextBlock Margin="5" Width="Auto" Height="auto" TextAlignment="Center" FontFamily="{StaticResource Jura}" FontSize="13pt" Foreground="{StaticResource Brush_TextBlock_Inactivity}" HorizontalAlignment="Center" VerticalAlignment="Center" KeyboardNavigation.IsTabStop="False" TextWrapping="Wrap" TextTrimming="CharacterEllipsis">
+ <Run Text="{DynamicResource advice_part1_more}"/>
+ <Run Text="{DynamicResource advice_part2_more}" Foreground="{StaticResource Brush_Accent}"/>
+ <Run Text="{DynamicResource advice_part3_more}"/>
+ </TextBlock>
</Grid>
-
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="auto" />
- <RowDefinition Height="*" />
- </Grid.RowDefinitions>
- <Grid Grid.Row="0">
- <TextBlock Margin="5" Width="Auto" Height="auto" TextAlignment="Center" FontFamily="{StaticResource Jura}" FontSize="13pt" Foreground="{StaticResource Brush_TextBlock_Inactivity}" HorizontalAlignment="Center" VerticalAlignment="Center" KeyboardNavigation.IsTabStop="False" TextWrapping="Wrap" TextTrimming="CharacterEllipsis">
- <Run Text="{DynamicResource advice_part1_more}"/>
- <Run Text="{DynamicResource advice_part2_more}" Foreground="{StaticResource Brush_Accent}"/>
- <Run Text="{DynamicResource advice_part3_more}"/>
- </TextBlock>
- </Grid>
-
- <Grid Grid.Row="1">
- <ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
- <uc:FlowPanel Margin="20,20,5,20" UseMasonryLayout="False" HorizontalSpacing="5" VerticalSpacing="10" ContentAlignment="Stretch" HorizontalAlignment="Left" VerticalAlignment="Top">
- <uc:Card Title="{DynamicResource title_licens_more}" Description="{DynamicResource text_licens_more}" BtnContent="{DynamicResource btn_activation}" ClickButton="BtnLicenseWindows_ClickButton">
- <uc:Card.IconStyle>
- <Style TargetType="Image">
- <Setter Property="Source" Value="{StaticResource Icon_LicenseWindows}" />
- </Style>
- </uc:Card.IconStyle>
- </uc:Card>
+ <Grid Grid.Row="1">
+ <ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
+ <uc:FlowPanel Margin="20,20,5,20" UseMasonryLayout="False" HorizontalSpacing="5" VerticalSpacing="10" ContentAlignment="Stretch" HorizontalAlignment="Left" VerticalAlignment="Top">
+ <uc:Card Title="{DynamicResource title_licens_more}" Description="{DynamicResource text_licens_more}" BtnContent="{DynamicResource btn_activation}" ClickButton="BtnLicenseWindows_ClickButton">
+ <uc:Card.IconStyle>
+ <Style TargetType="Image">
+ <Setter Property="Source" Value="{StaticResource Icon_LicenseWindows}" />
+ </Style>
+ </uc:Card.IconStyle>
+ </uc:Card>
- <uc:Card Title="{DynamicResource title_point_more}" Description="{DynamicResource text_point_more}" BtnContentSecondary="{DynamicResource btn_recovery}" BtnContent="{DynamicResource btn_save}" ClickButton="BtnCreatePoint_ClickButton" ClickButtonSecondary="BtnRecovey_ClickButton">
- <uc:Card.IconStyle>
- <Style TargetType="Image">
- <Setter Property="Source" Value="{StaticResource Icon_Backup}" />
- </Style>
- </uc:Card.IconStyle>
- </uc:Card>
+ <uc:Card Title="{DynamicResource title_point_more}" Description="{DynamicResource text_point_more}" BtnContentSecondary="{DynamicResource btn_recovery}" BtnContent="{DynamicResource btn_save}" ClickButton="BtnCreatePoint_ClickButton" ClickButtonSecondary="BtnRecovey_ClickButton">
+ <uc:Card.IconStyle>
+ <Style TargetType="Image">
+ <Setter Property="Source" Value="{StaticResource Icon_Backup}" />
+ </Style>
+ </uc:Card.IconStyle>
+ </uc:Card>
- <uc:Card Title="{DynamicResource title_point_state_more}" Description="{DynamicResource text_point_state_more}" BtnContentSecondary="{DynamicResource btn_enable}" BtnContent="{DynamicResource btn_disable}" ClickButton="BtnDisablePoint_ClickButton" ClickButtonSecondary="BtnEnablePoint_ClickButton">
- <uc:Card.IconStyle>
- <Style TargetType="Image">
- <Setter Property="Source" Value="{StaticResource Icon_BackupState}" />
- </Style>
- </uc:Card.IconStyle>
- </uc:Card>
+ <uc:Card Title="{DynamicResource title_point_state_more}" Description="{DynamicResource text_point_state_more}" BtnContentSecondary="{DynamicResource btn_enable}" BtnContent="{DynamicResource btn_disable}" ClickButton="BtnDisablePoint_ClickButton" ClickButtonSecondary="BtnEnablePoint_ClickButton">
+ <uc:Card.IconStyle>
+ <Style TargetType="Image">
+ <Setter Property="Source" Value="{StaticResource Icon_BackupState}" />
+ </Style>
+ </uc:Card.IconStyle>
+ </uc:Card>
- <uc:Card Title="{DynamicResource title_clear_more}" Description="{DynamicResource text_clear_more}" BtnContent="{DynamicResource btn_clear}" ClickButton="BtnClear_ClickButton">
- <uc:Card.IconStyle>
- <Style TargetType="Image">
- <Setter Property="Source" Value="{StaticResource Icon_Trash}" />
- </Style>
- </uc:Card.IconStyle>
- </uc:Card>
+ <uc:Card Title="{DynamicResource title_clear_more}" Description="{DynamicResource text_clear_more}" BtnContent="{DynamicResource btn_clear}" ClickButton="BtnClear_ClickButton">
+ <uc:Card.IconStyle>
+ <Style TargetType="Image">
+ <Setter Property="Source" Value="{StaticResource Icon_Trash}" />
+ </Style>
+ </uc:Card.IconStyle>
+ </uc:Card>
- <uc:Card Title="{DynamicResource title_ntfs_more}" Description="{DynamicResource text_ntfs_more}" BtnContentSecondary="{DynamicResource btn_enable}" BtnContent="{DynamicResource btn_disable}" ClickButton="BtnDecompression_ClickButton" ClickButtonSecondary="BtnCompression_ClickButton">
- <uc:Card.IconStyle>
- <Style TargetType="Image">
- <Setter Property="Source" Value="{StaticResource Icon_Ntfs}" />
- </Style>
- </uc:Card.IconStyle>
- </uc:Card>
+ <uc:Card Title="{DynamicResource title_ntfs_more}" Description="{DynamicResource text_ntfs_more}" BtnContentSecondary="{DynamicResource btn_enable}" BtnContent="{DynamicResource btn_disable}" ClickButton="BtnDecompression_ClickButton" ClickButtonSecondary="BtnCompression_ClickButton">
+ <uc:Card.IconStyle>
+ <Style TargetType="Image">
+ <Setter Property="Source" Value="{StaticResource Icon_Ntfs}" />
+ </Style>
+ </uc:Card.IconStyle>
+ </uc:Card>
- <uc:Card Title="{DynamicResource title_registry_more}" Description="{DynamicResource text_registry_more}" BtnContent="{DynamicResource btn_create}" ClickButton="BtnRegExport_ClickButton">
- <uc:Card.IconStyle>
- <Style TargetType="Image">
- <Setter Property="Source" Value="{StaticResource Icon_Registry}" />
- </Style>
- </uc:Card.IconStyle>
- </uc:Card>
-
- </uc:FlowPanel>
- </ScrollViewer>
- </Grid>
+ <uc:Card Title="{DynamicResource title_registry_more}" Description="{DynamicResource text_registry_more}" BtnContent="{DynamicResource btn_create}" ClickButton="BtnRegExport_ClickButton">
+ <uc:Card.IconStyle>
+ <Style TargetType="Image">
+ <Setter Property="Source" Value="{StaticResource Icon_Registry}" />
+ </Style>
+ </uc:Card.IconStyle>
+ </uc:Card>
+
+ </uc:FlowPanel>
+ </ScrollViewer>
</Grid>
-
-
</Grid>
</UserControl>
diff --git a/.Source/GTweak/View/UtilsView.xaml.cs b/.Source/GTweak/View/UtilsView.xaml.cs
index 7b49f28b..bc6867ae 100644
--- a/.Source/GTweak/View/UtilsView.xaml.cs
+++ b/.Source/GTweak/View/UtilsView.xaml.cs
@@ -17,12 +17,13 @@ namespace GTweak.View
private readonly SystemRestoreService _systemRestore = new SystemRestoreService();
private readonly NTFSCompressor _ntfsCompressor = new NTFSCompressor();
- private bool _isWinOldRemoval = false;
- private static bool _hasDeclined = false;
+ private bool? _isWinOldRemoval = false;
public UtilsView()
{
InitializeComponent();
+
+ Unloaded += delegate { OverlayDialogManager.Close(); };
}
private async void BtnLicenseWindows_ClickButton(object sender, EventArgs e)
@@ -161,14 +162,18 @@ namespace GTweak.View
{
ClearingMemory clearingMemory = new ClearingMemory();
- if (clearingMemory.IsWinOldExists && !_hasDeclined)
+ if (clearingMemory.IsWinOldExists)
{
- OverlayDialogManager overlayDialog = new OverlayDialogManager(Overlay, OpacityProperty, BtnAgree, BtnDecline, onSecondary: () => _hasDeclined = true);
- _isWinOldRemoval = await overlayDialog.Show();
+ _isWinOldRemoval = await OverlayDialogManager.Show("title_over_more", "text_over_more", "question_over_more", "btn_agree", "btn_decline");
+
+ if (_isWinOldRemoval == null)
+ {
+ return;
+ }
}
BackgroundQueue backgroundQueue = new BackgroundQueue();
- await backgroundQueue.QueueTask(delegate { clearingMemory.StartMemoryCleanup(_isWinOldRemoval); });
+ await backgroundQueue.QueueTask(delegate { clearingMemory.StartMemoryCleanup((bool)_isWinOldRemoval); });
await backgroundQueue.QueueTask(delegate { NotificationManager.Show("info", "clear_ram_noty").WithDelay(500).Perform(); });
}
diff --git a/.Source/GTweak/Windows/MainWindow.xaml b/.Source/GTweak/Windows/MainWindow.xaml
index c2b679e5..56ace943 100644
--- a/.Source/GTweak/Windows/MainWindow.xaml
+++ b/.Source/GTweak/Windows/MainWindow.xaml
@@ -146,16 +146,14 @@
</StackPanel>
</Viewbox>
- <Viewbox HorizontalAlignment="Left" Stretch="Uniform" StretchDirection="DownOnly" Height="45" Margin="40,10,10,0">
- <StackPanel Orientation="Horizontal" VerticalAlignment="Top">
- <TextBlock Style="{StaticResource TextDefault}" Text="{DynamicResource cmbox_lang_main}"/>
- <ComboBox Style="{StaticResource CustomComboBoxStyle}" Margin="10,0,0,0" Height="33" ItemsSource="{Binding Languages}" SelectedValue="{Binding SelectedLanguage, Mode=TwoWay}" SelectedValuePath="Code" DisplayMemberPath="Display">
- <ComboBox.CacheMode>
- <BitmapCache RenderAtScale="2" EnableClearType="True"/>
- </ComboBox.CacheMode>
- </ComboBox>
- </StackPanel>
- </Viewbox>
+ <uc:FlowPanel ContentAlignment="Left" Orientation="Horizontal" HorizontalSpacing="10" VerticalSpacing="5" Margin="40,10,5,0">
+ <TextBlock Style="{StaticResource TextDefault}" Text="{DynamicResource cmbox_lang_main}" Margin="0,5,0,0"/>
+ <ComboBox Style="{StaticResource CustomComboBoxStyle}" Height="32" ItemsSource="{Binding Languages}" SelectedValue="{Binding SelectedLanguage, Mode=TwoWay}" SelectedValuePath="Code" DisplayMemberPath="Display">
+ <ComboBox.CacheMode>
+ <BitmapCache RenderAtScale="2" EnableClearType="True"/>
+ </ComboBox.CacheMode>
+ </ComboBox>
+ </uc:FlowPanel>
<Border Background="{StaticResource Brush_Separator}" Height="1.2" Width="330" VerticalAlignment="Bottom" CornerRadius="10" Margin="0,10,0,0"/>
@@ -292,7 +290,31 @@
</ScrollViewer>
</Border>
</Grid>
- <ContentControl Grid.Column="1" Content="{Binding CurrentView}" IsTabStop="False" KeyboardNavigation.TabNavigation="None" Margin="5,5,0,5" PreviewMouseLeftButtonUp="ContentControl_PreviewMouseLeftButtonUp"/>
+
+ <Grid Grid.Column="1">
+ <ContentControl Content="{Binding CurrentView}" IsTabStop="False" KeyboardNavigation.TabNavigation="None" Margin="5,5,0,5" PreviewMouseLeftButtonUp="ContentControl_PreviewMouseLeftButtonUp"/>
+
+ <Grid x:Name="OverlayDialog" Panel.ZIndex="100" Visibility="Collapsed">
+ <Grid Background="{StaticResource Brush_Background}" Opacity="0.9"/>
+ <ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
+ <Grid HorizontalAlignment="Center" VerticalAlignment="Top" Margin="0,100,0,0">
+ <StackPanel Orientation="Vertical">
+ <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
+ <ui:SymbolIcon Symbol="Warning24" FontSize="20px" Foreground="{StaticResource Brush_Accent}"/>
+ <TextBlock x:Name="DialogTitle" Style="{StaticResource TextDefault}" Foreground="{StaticResource Brush_Highlighted}" FontSize="20px" Margin="5,0,0,0"/>
+ </StackPanel>
+ <TextBlock x:Name="DialogText" Margin="0,10,0,0" Style="{StaticResource TextDefault}" MaxWidth="700" Foreground="{DynamicResource Brush_TextBlock_Inactivity}" FontSize="16px" TextAlignment="Center" TextWrapping="Wrap" TextTrimming="CharacterEllipsis"/>
+ <TextBlock x:Name="DialogQuestion" Margin="0,10,0,0" Style="{StaticResource TextDefault}" MaxWidth="700" Foreground="{DynamicResource Brush_Accent}" FontSize="16px" TextAlignment="Center" TextWrapping="Wrap" TextTrimming="CharacterEllipsis"/>
+
+ <StackPanel Margin="0,20,0,0" HorizontalAlignment="Center" Orientation="Horizontal">
+ <Button x:Name="DialogBtnPrimary" Style="{StaticResource ButtonContent}" HorizontalAlignment="Left" MinWidth="120"/>
+ <Button x:Name="DialogBtnSecondary" Margin="50,0,0,0" Style="{StaticResource ButtonContent_Inverted}" HorizontalAlignment="Right" MinWidth="120"/>
+ </StackPanel>
+ </StackPanel>
+ </Grid>
+ </ScrollViewer>
+ </Grid>
+ </Grid>
</Grid>
diff --git a/.Source/GTweak/Windows/MainWindow.xaml.cs b/.Source/GTweak/Windows/MainWindow.xaml.cs
index f286ed10..2239ceef 100644
--- a/.Source/GTweak/Windows/MainWindow.xaml.cs
+++ b/.Source/GTweak/Windows/MainWindow.xaml.cs
@@ -12,6 +12,7 @@ using System.Windows.Threading;
using GTweak.Utilities.Animation;
using GTweak.Utilities.Configuration;
using GTweak.Utilities.Controls;
+using GTweak.Utilities.Managers;
using Wpf.Ui.Controls;
namespace GTweak.Windows
@@ -44,6 +45,7 @@ namespace GTweak.Windows
public MainWindow()
{
InitializeComponent();
+ OverlayDialogManager.Initialize(OverlayDialog, DialogTitle, DialogText, DialogQuestion, DialogBtnPrimary, DialogBtnSecondary);
App.TweaksImported += delegate { BtnUtils.IsChecked = true; };
}