mirror of
https://github.com/Raphire/Win11Debloat.git
synced 2026-05-18 11:46:18 +00:00
Starting from this commit, Win11Debloat will automatically create a registry backup every time the script is run. This registry backup can be used to revert any registry changes made by the script.
182 lines
9.1 KiB
XML
182 lines
9.1 KiB
XML
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
Title="Apply Changes"
|
|
Width="500"
|
|
SizeToContent="Height"
|
|
ResizeMode="NoResize"
|
|
WindowStartupLocation="CenterOwner"
|
|
WindowStyle="None"
|
|
AllowsTransparency="True"
|
|
Background="Transparent"
|
|
Topmost="False"
|
|
ShowInTaskbar="False">
|
|
|
|
<Border Style="{DynamicResource ModalCardBorderStyle}">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- Close/Cancel button (top right) -->
|
|
<Button x:Name="ApplyCancelBtn" Grid.Row="0"
|
|
HorizontalAlignment="Right" VerticalAlignment="Top"
|
|
Width="36" Height="32"
|
|
BorderThickness="0"
|
|
Cursor="Hand"
|
|
ToolTip="Cancel"
|
|
AutomationProperties.Name="Cancel">
|
|
<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 FgColor}"/>
|
|
<Style.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter Property="Background" Value="{DynamicResource CloseHover}"/>
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</Button.Style>
|
|
<TextBlock Text="" FontFamily="Segoe Fluent Icons" FontSize="10"/>
|
|
</Button>
|
|
|
|
<StackPanel Grid.Row="0" Grid.RowSpan="2">
|
|
<!-- In-progress content -->
|
|
<StackPanel x:Name="ApplyInProgressPanel">
|
|
<StackPanel Margin="32,24">
|
|
<!-- Loading icon (spinning) -->
|
|
<TextBlock x:Name="ApplySpinnerIcon"
|
|
Text=""
|
|
FontFamily="Segoe Fluent Icons"
|
|
FontSize="36"
|
|
Foreground="{DynamicResource ButtonBg}"
|
|
HorizontalAlignment="Center"
|
|
Margin="0,0,0,16"
|
|
RenderTransformOrigin="0.5,0.5">
|
|
<TextBlock.RenderTransform>
|
|
<RotateTransform x:Name="SpinnerRotation" Angle="0"/>
|
|
</TextBlock.RenderTransform>
|
|
<TextBlock.Triggers>
|
|
<EventTrigger RoutedEvent="Loaded">
|
|
<BeginStoryboard>
|
|
<Storyboard>
|
|
<DoubleAnimation Storyboard.TargetName="SpinnerRotation"
|
|
Storyboard.TargetProperty="Angle"
|
|
From="0" To="360"
|
|
Duration="0:0:1.5"
|
|
RepeatBehavior="Forever"/>
|
|
</Storyboard>
|
|
</BeginStoryboard>
|
|
</EventTrigger>
|
|
</TextBlock.Triggers>
|
|
</TextBlock>
|
|
|
|
<TextBlock Text="Applying Changes"
|
|
Style="{DynamicResource ModalTitleStyle}"/>
|
|
|
|
<!-- Current step name -->
|
|
<TextBlock x:Name="ApplyStepName"
|
|
Text="Preparing..."
|
|
Style="{DynamicResource ModalSubtextStyle}"
|
|
TextTrimming="CharacterEllipsis"
|
|
MaxWidth="430"/>
|
|
</StackPanel>
|
|
|
|
<Border Style="{DynamicResource ModalFooterBorderStyle}">
|
|
<StackPanel>
|
|
|
|
<!-- Progress bar -->
|
|
<ProgressBar x:Name="ApplyProgressBar"
|
|
Style="{DynamicResource ApplyProgressBarStyle}"
|
|
Minimum="0" Maximum="100" Value="0"
|
|
Margin="0,2,0,8"/>
|
|
|
|
<!-- Step counter -->
|
|
<TextBlock x:Name="ApplyStepCounter"
|
|
Text="Step 0 of 0"
|
|
FontSize="12"
|
|
Foreground="{DynamicResource FgColor}"
|
|
HorizontalAlignment="Right"
|
|
Opacity="0.8"/>
|
|
</StackPanel>
|
|
</Border>
|
|
</StackPanel>
|
|
|
|
<!-- Completion content -->
|
|
<StackPanel x:Name="ApplyCompletionPanel" Visibility="Collapsed">
|
|
<StackPanel Margin="32,24">
|
|
<!-- Success icon -->
|
|
<TextBlock x:Name="ApplyCompletionIcon"
|
|
Text=""
|
|
FontFamily="Segoe Fluent Icons"
|
|
FontSize="40"
|
|
Foreground="{DynamicResource ButtonBg}"
|
|
HorizontalAlignment="Center"
|
|
Margin="0,0,0,12"/>
|
|
|
|
<TextBlock x:Name="ApplyCompletionTitle"
|
|
Text="Changes Applied"
|
|
Style="{DynamicResource ModalTitleStyle}"/>
|
|
|
|
<TextBlock x:Name="ApplyCompletionMessage"
|
|
Text="Please note that some changes will only take effect after a reboot. Thanks for using Win11Debloat!"
|
|
TextWrapping="Wrap"
|
|
Style="{DynamicResource ModalSubtextStyle}"/>
|
|
</StackPanel>
|
|
|
|
<!-- Reboot required section -->
|
|
<Border x:Name="ApplyRebootPanel"
|
|
Visibility="Collapsed"
|
|
BorderBrush="{DynamicResource BorderColor}"
|
|
HorizontalAlignment="Center"
|
|
BorderThickness="0,1,0,1"
|
|
Padding="24,12,24,14">
|
|
<StackPanel>
|
|
<StackPanel Orientation="Horizontal" Margin="0,0,0,6">
|
|
<TextBlock Text=""
|
|
FontFamily="Segoe Fluent Icons"
|
|
FontSize="14"
|
|
Foreground="#e8912d"
|
|
VerticalAlignment="Center"
|
|
Margin="0,0,8,0"/>
|
|
<TextBlock Text="A reboot is required for these changes to take effect:"
|
|
FontSize="13"
|
|
FontWeight="SemiBold"
|
|
Foreground="{DynamicResource FgColor}"
|
|
VerticalAlignment="Center"/>
|
|
</StackPanel>
|
|
<StackPanel x:Name="ApplyRebootList" Margin="22,0,0,0"/>
|
|
</StackPanel>
|
|
</Border>
|
|
|
|
<!-- Button Panel -->
|
|
<Border Style="{DynamicResource ModalFooterBorderStyle}">
|
|
<UniformGrid x:Name="ButtonPanel" Rows="1">
|
|
<Button x:Name="ApplyKofiBtn"
|
|
Style="{DynamicResource ModalSecondaryStretchedButtonStyle}"
|
|
AutomationProperties.Name="Support the creator">
|
|
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
|
|
<TextBlock Text="" FontFamily="Segoe Fluent Icons" FontSize="14" VerticalAlignment="Center" Margin="0,0,8,-1"/>
|
|
<TextBlock Text="Support the creator" VerticalAlignment="Center" FontSize="14" Margin="0,0,0,1"/>
|
|
</StackPanel>
|
|
</Button>
|
|
<Button x:Name="ApplyCloseBtn"
|
|
Style="{DynamicResource ModalPrimaryStretchedButtonStyle}"
|
|
AutomationProperties.Name="Close">
|
|
<TextBlock Text="Close" VerticalAlignment="Center" FontSize="14" Margin="0,0,0,1"/>
|
|
</Button>
|
|
</UniformGrid>
|
|
</Border>
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</Grid>
|
|
</Border>
|
|
</Window>
|