Files
Win11Debloat/Schemas/RestoreBackupWindow.xaml
T

428 lines
24 KiB
XML
Raw Normal View History

2026-05-08 21:19:52 +02:00
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="%LANG:RestoreWindowTitle%"
2026-05-08 21:19:52 +02:00
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}"/>
2026-05-08 21:19:52 +02:00
<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}"/>
2026-05-08 21:19:52 +02:00
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{DynamicResource SecondaryButtonHoverColor}"/>
2026-05-08 21:19:52 +02:00
<Setter Property="BorderBrush" Value="{DynamicResource ButtonBorderColor}"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="{DynamicResource SecondaryButtonPressedColor}"/>
2026-05-08 21:19:52 +02:00
<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%"
2026-05-08 21:19:52 +02:00
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%">
2026-05-08 21:19:52 +02:00
<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}"/>
2026-05-08 21:19:52 +02:00
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{DynamicResource TitleBarCloseHoverColor}"/>
2026-05-08 21:19:52 +02:00
</Trigger>
</Style.Triggers>
</Style>
</Button.Style>
<TextBlock Text="&#xE8BB;" FontFamily="{DynamicResource AppIconFontFamily}" FontSize="10"/>
2026-05-08 21:19:52 +02:00
</Button>
<ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Auto" Margin="0">
<Grid Margin="20,4,20,16">
2026-05-08 21:19:52 +02:00
<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%"/>
2026-05-08 21:19:52 +02:00
<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="&#xEF58;"
FontFamily="{DynamicResource AppIconFontFamily}"
2026-05-08 21:19:52 +02:00
FontSize="24"
VerticalAlignment="Center"
Margin="14,0,14,0"/>
<StackPanel Grid.Column="1"
VerticalAlignment="Center"
Margin="0,0,12,0">
<TextBlock Text="%LANG:RestoreChooseRegistryTitle%"
2026-05-08 21:19:52 +02:00
FontSize="16"
FontWeight="SemiBold"/>
<TextBlock Text="%LANG:RestoreChooseRegistryDescription%"
2026-05-08 21:19:52 +02:00
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="&#xE8FC;"
FontFamily="{DynamicResource AppIconFontFamily}"
2026-05-08 21:19:52 +02:00
FontSize="24"
VerticalAlignment="Center"
Margin="14,0,14,0"/>
<StackPanel Grid.Column="1"
VerticalAlignment="Center"
Margin="0,0,12,0">
<TextBlock Text="%LANG:RestoreChooseStartMenuTitle%"
2026-05-08 21:19:52 +02:00
FontSize="16"
FontWeight="SemiBold"/>
<TextBlock Text="%LANG:RestoreChooseStartMenuDescription%"
2026-05-08 21:19:52 +02:00
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%"/>
2026-05-08 21:19:52 +02:00
<TextBlock Grid.Row="1"
Margin="0,12,0,2"
TextWrapping="Wrap"
FontSize="13"
Foreground="{DynamicResource AppFgColor}"
2026-05-08 21:19:52 +02:00
Opacity="0.75"
Text="%LANG:RestoreRegistryWarning%"/>
2026-05-08 21:19:52 +02:00
</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"/>
2026-05-08 21:19:52 +02:00
</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"/>
2026-05-08 21:19:52 +02:00
<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}"/>
2026-05-08 21:19:52 +02:00
<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"/>
2026-05-08 21:19:52 +02:00
</Grid>
<Border Grid.Row="1" Height="1" Background="{DynamicResource AppBorderColor}" Margin="0,0,0,12"/>
2026-05-08 21:19:52 +02:00
<Grid x:Name="OverviewFeaturesSection" Grid.Row="2">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<TextBlock Grid.Row="0"
Text="%LANG:RestoreRevertibleFeaturesTitle%"
2026-05-08 21:19:52 +02:00
FontSize="13"
Foreground="{DynamicResource AppFgColor}"
2026-05-08 21:19:52 +02:00
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"/>
2026-05-08 21:19:52 +02:00
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</Grid>
<TextBlock x:Name="OverviewSummaryText"
Grid.Row="2"
FontSize="13"
Foreground="{DynamicResource AppFgColor}"
2026-05-08 21:19:52 +02:00
TextWrapping="Wrap"
Visibility="Collapsed"
Text="%LANG:RestoreStartMenuSummary%"/>
2026-05-08 21:19:52 +02:00
<Border x:Name="ReappliedSeparator" Grid.Row="3" Height="1" Background="{DynamicResource AppBorderColor}" Margin="0,12,0,12" Visibility="Collapsed"/>
2026-05-08 21:19:52 +02:00
<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">
2026-05-08 21:19:52 +02:00
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock Grid.Row="0"
Text="%LANG:RestoreNonRevertibleFeaturesTitle%"
2026-05-08 21:19:52 +02:00
FontSize="13"
Foreground="{DynamicResource AppFgColor}"
2026-05-08 21:19:52 +02:00
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"/>
2026-05-08 21:19:52 +02:00
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<TextBlock x:Name="NonRevertibleWikiLink"
Grid.Row="2"
Margin="0,8,0,0"
Text="%LANG:RestoreWikiLink%"
2026-05-08 21:19:52 +02:00
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%"/>
2026-05-08 21:19:52 +02:00
<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"/>
2026-05-08 21:19:52 +02:00
</ComboBox>
<CheckBox x:Name="StartMenuAutoBackupCheck"
Grid.Row="2"
Content="%LANG:RestoreStartMenuAutoBackupCheckbox%"
2026-05-08 21:19:52 +02:00
IsChecked="True"
FontSize="12"
Margin="0,10,0,0"
Foreground="{DynamicResource AppFgColor}"
2026-05-08 21:19:52 +02:00
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%"
2026-05-08 21:19:52 +02:00
Visibility="Collapsed"
Style="{DynamicResource ModalPrimaryStretchedButtonStyle}"/>
<Button x:Name="BackBtn"
Grid.Column="1"
Content="%LANG:RestoreBackBtnBack%"
2026-05-08 21:19:52 +02:00
Visibility="Collapsed"
Style="{DynamicResource ModalSecondaryStretchedButtonStyle}"/>
</Grid>
</Border>
</Grid>
</Border>
</Window>