mirror of
https://github.com/Raphire/Win11Debloat.git
synced 2026-10-08 14:36:48 +00:00
Credit to @jmolinap2 for their work in #643, which was used as inspiration.
428 lines
24 KiB
XML
428 lines
24 KiB
XML
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
Title="%LANG:RestoreWindowTitle%"
|
|
Width="500"
|
|
SizeToContent="Height"
|
|
MaxHeight="560"
|
|
ResizeMode="NoResize"
|
|
WindowStartupLocation="CenterOwner"
|
|
WindowStyle="None"
|
|
AllowsTransparency="True"
|
|
Background="Transparent"
|
|
Topmost="False"
|
|
ShowInTaskbar="False">
|
|
|
|
<Window.Resources>
|
|
<Style x:Key="RestoreOptionTileStyle" TargetType="Button">
|
|
<Setter Property="Background" Value="{DynamicResource SecondaryButtonBgColor}"/>
|
|
<Setter Property="Foreground" Value="{DynamicResource AppFgColor}"/>
|
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonBorderColor}"/>
|
|
<Setter Property="BorderThickness" Value="1"/>
|
|
<Setter Property="Padding" Value="12,10"/>
|
|
<Setter Property="FontSize" Value="14"/>
|
|
<Setter Property="Cursor" Value="Hand"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="Button">
|
|
<Border Background="{TemplateBinding Background}"
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
CornerRadius="8"
|
|
Padding="{TemplateBinding Padding}">
|
|
<ContentPresenter HorizontalAlignment="Left" VerticalAlignment="Center" Margin="0,0,0,1"/>
|
|
</Border>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Style.Triggers>
|
|
<Trigger Property="IsEnabled" Value="False">
|
|
<Setter Property="Background" Value="{DynamicResource SecondaryButtonDisabledColor}"/>
|
|
<Setter Property="BorderBrush" Value="{DynamicResource AppBorderColor}"/>
|
|
<Setter Property="Foreground" Value="{DynamicResource SecondaryButtonTextDisabledColor}"/>
|
|
</Trigger>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter Property="Background" Value="{DynamicResource SecondaryButtonHoverColor}"/>
|
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonBorderColor}"/>
|
|
</Trigger>
|
|
<Trigger Property="IsPressed" Value="True">
|
|
<Setter Property="Background" Value="{DynamicResource SecondaryButtonPressedColor}"/>
|
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonBorderColor}"/>
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</Window.Resources>
|
|
|
|
<Border Style="{DynamicResource ModalCardBorderStyle}">
|
|
<Grid Margin="0">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<Grid Grid.Row="0" x:Name="TitleBar" Style="{DynamicResource ModalTitleBarStyle}">
|
|
<TextBlock x:Name="TitleText"
|
|
Text="%LANG:RestoreWindowTitle%"
|
|
Style="{DynamicResource ModalTitleTextStyle}"/>
|
|
</Grid>
|
|
|
|
<Button x:Name="CloseBtn" Grid.Row="0"
|
|
HorizontalAlignment="Right" VerticalAlignment="Top"
|
|
Width="36" Height="32"
|
|
BorderThickness="0"
|
|
Cursor="Hand"
|
|
ToolTip="%LANG:TitleBarClose%"
|
|
AutomationProperties.Name="%LANG:TitleBarClose%">
|
|
<Button.Template>
|
|
<ControlTemplate TargetType="Button">
|
|
<Border Background="{TemplateBinding Background}" BorderThickness="0" CornerRadius="0,8,0,0">
|
|
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
|
</Border>
|
|
</ControlTemplate>
|
|
</Button.Template>
|
|
<Button.Style>
|
|
<Style TargetType="Button">
|
|
<Setter Property="Background" Value="Transparent"/>
|
|
<Setter Property="Foreground" Value="{DynamicResource AppFgColor}"/>
|
|
<Style.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter Property="Background" Value="{DynamicResource TitleBarCloseHoverColor}"/>
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</Button.Style>
|
|
<TextBlock Text="" FontFamily="{DynamicResource AppIconFontFamily}" FontSize="10"/>
|
|
</Button>
|
|
|
|
<ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Auto" Margin="0">
|
|
<Grid Margin="20,4,20,16">
|
|
|
|
<TabControl x:Name="RestoreModeTabs"
|
|
SelectedIndex="0"
|
|
Background="Transparent"
|
|
BorderThickness="0"
|
|
Padding="0">
|
|
<TabControl.ItemContainerStyle>
|
|
<Style TargetType="TabItem">
|
|
<Setter Property="Visibility" Value="Collapsed"/>
|
|
<Setter Property="Height" Value="0"/>
|
|
</Style>
|
|
</TabControl.ItemContainerStyle>
|
|
<TabItem x:Name="SelectTypeTab" Header="SelectType">
|
|
<Grid x:Name="SelectTypePanel">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<TextBlock Grid.Row="0"
|
|
TextWrapping="Wrap"
|
|
FontSize="14"
|
|
LineHeight="20"
|
|
Foreground="{DynamicResource AppFgColor}"
|
|
Text="%LANG:RestoreSelectTypePrompt%"/>
|
|
|
|
<Button x:Name="ChooseRegistryBtn"
|
|
Grid.Row="1"
|
|
Margin="0,14,0,0"
|
|
Style="{StaticResource RestoreOptionTileStyle}">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock Grid.Column="0"
|
|
Text=""
|
|
FontFamily="{DynamicResource AppIconFontFamily}"
|
|
FontSize="24"
|
|
VerticalAlignment="Center"
|
|
Margin="14,0,14,0"/>
|
|
<StackPanel Grid.Column="1"
|
|
VerticalAlignment="Center"
|
|
Margin="0,0,12,0">
|
|
<TextBlock Text="%LANG:RestoreChooseRegistryTitle%"
|
|
FontSize="16"
|
|
FontWeight="SemiBold"/>
|
|
<TextBlock Text="%LANG:RestoreChooseRegistryDescription%"
|
|
FontSize="12"
|
|
Opacity="0.75"
|
|
TextWrapping="Wrap"
|
|
Margin="0,2,0,0"/>
|
|
</StackPanel>
|
|
</Grid>
|
|
</Button>
|
|
|
|
<Button x:Name="ChooseStartMenuBtn"
|
|
Grid.Row="2"
|
|
Margin="0,10,0,0"
|
|
Style="{StaticResource RestoreOptionTileStyle}">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock Grid.Column="0"
|
|
Text=""
|
|
FontFamily="{DynamicResource AppIconFontFamily}"
|
|
FontSize="24"
|
|
VerticalAlignment="Center"
|
|
Margin="14,0,14,0"/>
|
|
<StackPanel Grid.Column="1"
|
|
VerticalAlignment="Center"
|
|
Margin="0,0,12,0">
|
|
<TextBlock Text="%LANG:RestoreChooseStartMenuTitle%"
|
|
FontSize="16"
|
|
FontWeight="SemiBold"/>
|
|
<TextBlock Text="%LANG:RestoreChooseStartMenuDescription%"
|
|
FontSize="12"
|
|
Opacity="0.75"
|
|
TextWrapping="Wrap"
|
|
Margin="0,2,0,0"/>
|
|
</StackPanel>
|
|
</Grid>
|
|
</Button>
|
|
</Grid>
|
|
</TabItem>
|
|
|
|
<TabItem x:Name="RegistryTab" Header="Registry">
|
|
<Grid x:Name="RegistryPanel">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<Grid x:Name="IntroInfoPanel" Grid.Row="0">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<TextBlock Grid.Row="0"
|
|
TextWrapping="Wrap"
|
|
FontSize="14"
|
|
LineHeight="20"
|
|
Foreground="{DynamicResource AppFgColor}"
|
|
Text="%LANG:RestoreRegistryIntro%"/>
|
|
|
|
<TextBlock Grid.Row="1"
|
|
Margin="0,12,0,2"
|
|
TextWrapping="Wrap"
|
|
FontSize="13"
|
|
Foreground="{DynamicResource AppFgColor}"
|
|
Opacity="0.75"
|
|
Text="%LANG:RestoreRegistryWarning%"/>
|
|
</Grid>
|
|
|
|
<Grid x:Name="OverviewPanel" Grid.Row="1" Margin="0" Visibility="Collapsed">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<Grid Grid.Row="0" Margin="0,0,0,16">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<TextBlock Grid.Row="0" Grid.Column="0" Text="%LANG:RestoreFileLabel%" Style="{DynamicResource ModalInfoLabelTextStyle}"/>
|
|
<TextBlock x:Name="BackupFileText" Grid.Row="0" Grid.Column="1" Text="%LANG:RestoreFileNotSelected%" Style="{DynamicResource ModalInfoValueTextStyle}" TextWrapping="Wrap" Margin="0,0,0,8"/>
|
|
|
|
<TextBlock Grid.Row="1" Grid.Column="0" Text="%LANG:RestoreCreatedLabel%" Style="{DynamicResource ModalInfoLabelTextStyle}"/>
|
|
<TextBlock x:Name="BackupCreatedText" Grid.Row="1" Grid.Column="1" Text="%LANG:RestoreCreatedUnavailable%" Style="{DynamicResource ModalInfoValueTextStyle}"/>
|
|
|
|
<TextBlock Grid.Row="2" Grid.Column="0" Text="%LANG:RestoreTargetLabel%" Style="{DynamicResource ModalInfoLabelTextStyle}" Margin="0,0,16,0"/>
|
|
<TextBlock x:Name="BackupTargetText" Grid.Row="2" Grid.Column="1" Text="%LANG:RestoreCreatedUnavailable%" Style="{DynamicResource ModalInfoValueTextStyle}" Margin="0"/>
|
|
</Grid>
|
|
|
|
<Border Grid.Row="1" Height="1" Background="{DynamicResource AppBorderColor}" Margin="0,0,0,12"/>
|
|
|
|
<Grid x:Name="OverviewFeaturesSection" Grid.Row="2">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<TextBlock Grid.Row="0"
|
|
Text="%LANG:RestoreRevertibleFeaturesTitle%"
|
|
FontSize="13"
|
|
Foreground="{DynamicResource AppFgColor}"
|
|
FontWeight="SemiBold"
|
|
Margin="0,0,0,8"/>
|
|
|
|
<ItemsControl x:Name="FeaturesItemsControl" Grid.Row="1">
|
|
<ItemsControl.ItemsPanel>
|
|
<ItemsPanelTemplate>
|
|
<StackPanel Orientation="Vertical" IsItemsHost="True"/>
|
|
</ItemsPanelTemplate>
|
|
</ItemsControl.ItemsPanel>
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding DisplayText}" FontSize="12" Foreground="{DynamicResource AppFgColor}" TextWrapping="Wrap" Margin="0,0,0,6"/>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
</Grid>
|
|
|
|
<TextBlock x:Name="OverviewSummaryText"
|
|
Grid.Row="2"
|
|
FontSize="13"
|
|
Foreground="{DynamicResource AppFgColor}"
|
|
TextWrapping="Wrap"
|
|
Visibility="Collapsed"
|
|
Text="%LANG:RestoreStartMenuSummary%"/>
|
|
|
|
<Border x:Name="ReappliedSeparator" Grid.Row="3" Height="1" Background="{DynamicResource AppBorderColor}" Margin="0,12,0,12" Visibility="Collapsed"/>
|
|
|
|
<Grid x:Name="ReappliedPanel" Grid.Row="4" Visibility="Collapsed">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<TextBlock Grid.Row="0"
|
|
Text="%LANG:RestoreReappliedFeaturesTitle%"
|
|
FontSize="13"
|
|
Foreground="{DynamicResource AppFgColor}"
|
|
FontWeight="SemiBold"
|
|
Margin="0,0,0,8"/>
|
|
|
|
<ItemsControl x:Name="ReappliedFeaturesItemsControl" Grid.Row="1">
|
|
<ItemsControl.ItemsPanel>
|
|
<ItemsPanelTemplate>
|
|
<StackPanel Orientation="Vertical" IsItemsHost="True"/>
|
|
</ItemsPanelTemplate>
|
|
</ItemsControl.ItemsPanel>
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding DisplayText}" FontSize="12" Foreground="{DynamicResource AppFgColor}" TextWrapping="Wrap" Margin="0,0,0,6"/>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
</Grid>
|
|
|
|
<Border x:Name="NonRevertibleSeparator" Grid.Row="5" Height="1" Background="{DynamicResource AppBorderColor}" Margin="0,12,0,12" Visibility="Collapsed"/>
|
|
|
|
<Grid x:Name="NonRevertiblePanel" Grid.Row="6" Visibility="Collapsed">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<TextBlock Grid.Row="0"
|
|
Text="%LANG:RestoreNonRevertibleFeaturesTitle%"
|
|
FontSize="13"
|
|
Foreground="{DynamicResource AppFgColor}"
|
|
FontWeight="SemiBold"
|
|
Margin="0,0,0,8"/>
|
|
|
|
<ItemsControl x:Name="NonRevertibleFeaturesItemsControl" Grid.Row="1">
|
|
<ItemsControl.ItemsPanel>
|
|
<ItemsPanelTemplate>
|
|
<StackPanel Orientation="Vertical" IsItemsHost="True"/>
|
|
</ItemsPanelTemplate>
|
|
</ItemsControl.ItemsPanel>
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding DisplayText}" FontSize="12" Foreground="{DynamicResource AppFgColor}" Opacity="0.85" TextWrapping="Wrap" Margin="0,0,0,6"/>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
|
|
<TextBlock x:Name="NonRevertibleWikiLink"
|
|
Grid.Row="2"
|
|
Margin="0,8,0,0"
|
|
Text="%LANG:RestoreWikiLink%"
|
|
FontSize="13"
|
|
FontWeight="SemiBold"
|
|
Style="{DynamicResource HyperlinkStyle}"
|
|
TextWrapping="Wrap"/>
|
|
</Grid>
|
|
</Grid>
|
|
</Grid>
|
|
</TabItem>
|
|
|
|
<TabItem x:Name="StartMenuTab" Header="StartMenu">
|
|
<Grid x:Name="StartMenuPanel">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<Grid x:Name="StartMenuIntroPanel" Grid.Row="0" Visibility="Visible">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<TextBlock Grid.Row="0"
|
|
TextWrapping="Wrap"
|
|
FontSize="14"
|
|
LineHeight="20"
|
|
Margin="0,0,0,12"
|
|
Foreground="{DynamicResource AppFgColor}"
|
|
Text="%LANG:RestoreStartMenuIntro%"/>
|
|
|
|
<ComboBox x:Name="StartMenuScopeCombo"
|
|
Grid.Row="1"
|
|
SelectedIndex="0"
|
|
Margin="0,0,0,2"
|
|
MinWidth="408"
|
|
HorizontalAlignment="Left">
|
|
<ComboBoxItem Content="%LANG:RestoreStartMenuScopeCurrentUser%" Tag="CurrentUser"/>
|
|
<ComboBoxItem Content="%LANG:RestoreStartMenuScopeAllUsers%" Tag="AllUsers"/>
|
|
</ComboBox>
|
|
|
|
<CheckBox x:Name="StartMenuAutoBackupCheck"
|
|
Grid.Row="2"
|
|
Content="%LANG:RestoreStartMenuAutoBackupCheckbox%"
|
|
IsChecked="True"
|
|
FontSize="12"
|
|
Margin="0,10,0,0"
|
|
Foreground="{DynamicResource AppFgColor}"
|
|
Opacity="0.85"/>
|
|
</Grid>
|
|
|
|
</Grid>
|
|
</TabItem>
|
|
</TabControl>
|
|
</Grid>
|
|
</ScrollViewer>
|
|
|
|
<Border Grid.Row="3" Style="{DynamicResource ModalFooterBorderStyle}">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Button x:Name="PrimaryActionBtn"
|
|
Grid.Column="0"
|
|
Content="%LANG:NavNext%"
|
|
Visibility="Collapsed"
|
|
Style="{DynamicResource ModalPrimaryStretchedButtonStyle}"/>
|
|
|
|
<Button x:Name="BackBtn"
|
|
Grid.Column="1"
|
|
Content="%LANG:RestoreBackBtnBack%"
|
|
Visibility="Collapsed"
|
|
Style="{DynamicResource ModalSecondaryStretchedButtonStyle}"/>
|
|
</Grid>
|
|
</Border>
|
|
</Grid>
|
|
</Border>
|
|
</Window>
|