<Window xmlns:props="clr-namespace:Ink_Canvas.Properties" x:Class="Ink_Canvas.Windows.OobeWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
        xmlns:ikw="http://schemas.inkore.net/lib/ui/wpf"
        xmlns:controls="clr-namespace:Ink_Canvas.Controls;assembly=InkCanvas.Controls"
        xmlns:sys="clr-namespace:System;assembly=mscorlib"
        mc:Ignorable="d"
        Title="{x:Static props:OobeStrings.Oobe_WelcomeTitle}"
        Height="700"
        Width="1080"
        MinHeight="520"
        MinWidth="880"
        WindowStartupLocation="CenterScreen"
        ResizeMode="CanResize"
        Topmost="True"
        Loaded="OobeWindow_OnLoaded"
        Closing="OobeWindow_OnClosing"
        ui:ThemeManager.IsThemeAware="True"
        ui:TitleBar.ExtendViewIntoTitleBar="True"
        ui:WindowHelper.SystemBackdropType="None"
        ui:WindowHelper.UseModernWindowStyle="True"
        ui:WindowHelper.CornerStyle="Round"
        ui:TitleBar.Height="40">

    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ui:ThemeResources CanBeAccessedAcrossThreads="True">
                    <ui:ThemeResources.ThemeDictionaries />
                </ui:ThemeResources>
            </ResourceDictionary.MergedDictionaries>

            <sys:Double x:Key="SettingsCardSpacing">4</sys:Double>

            <Style x:Key="SettingsSectionHeaderTextBlockStyle"
                   BasedOn="{StaticResource BodyStrongTextBlockStyle}"
                   TargetType="TextBlock">
                <Setter Property="Margin" Value="1,2,0,6" />
            </Style>
        </ResourceDictionary>
    </Window.Resources>

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <!-- 自定义标题栏 -->
        <Border x:Name="AppTitleBar"
                Grid.Row="0"
                Height="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}, Path=(ui:TitleBar.Height)}"
                Background="Transparent"
                IsHitTestVisible="True"
                Canvas.ZIndex="10">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition />
                    <ColumnDefinition Width="137" />
                </Grid.ColumnDefinitions>
                <ikw:SimpleStackPanel Grid.Column="0"
                                      Orientation="Horizontal"
                                      Spacing="12"
                                      VerticalAlignment="Center"
                                      Margin="16,0,0,0">
                    <Image Source="\Resources\icc.ico" Width="18"
                           RenderOptions.BitmapScalingMode="HighQuality" />
                    <TextBlock VerticalAlignment="Center"
                               Text="{x:Static props:OobeStrings.Oobe_WelcomeTitle}"
                               TextWrapping="NoWrap" />
                </ikw:SimpleStackPanel>

                <Rectangle Grid.Column="2"
                           Width="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}, Path=(ui:TitleBar.SystemOverlayRightInset)}" />
            </Grid>
        </Border>

        <!-- 主体: 左侧导航 + 内容 -->
        <ui:NavigationView x:Name="NavView"
                           Grid.Row="1"
                           PaneDisplayMode="Left"
                           IsPaneOpen="True"
                           IsBackButtonVisible="Collapsed"
                           IsBackEnabled="False"
                           IsSettingsVisible="False"
                           OpenPaneLength="240"
                           SelectionChanged="NavView_SelectionChanged">

            <ui:NavigationView.MenuItems>
                <ui:NavigationViewItem x:Name="NavItemWelcome" Content="{x:Static props:OobeStrings.Oobe_NavWelcome}" Tag="welcome">
                    <ui:NavigationViewItem.Icon>
                        <ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Home}" />
                    </ui:NavigationViewItem.Icon>
                </ui:NavigationViewItem>
                <ui:NavigationViewItemSeparator />
                <ui:NavigationViewItem x:Name="NavItemTelemetry" Content="{x:Static props:OobeStrings.Oobe_NavTelemetry}" Tag="step0">
                    <ui:NavigationViewItem.Icon>
                        <ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Shield}" />
                    </ui:NavigationViewItem.Icon>
                </ui:NavigationViewItem>
                <ui:NavigationViewItem x:Name="NavItemCanvas" Content="{x:Static props:OobeStrings.Oobe_NavCanvas}" Tag="step1">
                    <ui:NavigationViewItem.Icon>
                        <ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Edit}" />
                    </ui:NavigationViewItem.Icon>
                </ui:NavigationViewItem>
                <ui:NavigationViewItem x:Name="NavItemGestures" Content="{x:Static props:OobeStrings.Oobe_NavGestures}" Tag="step2">
                    <ui:NavigationViewItem.Icon>
                        <ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.TouchPointer}" />
                    </ui:NavigationViewItem.Icon>
                </ui:NavigationViewItem>
                <ui:NavigationViewItem x:Name="NavItemAppearance" Content="{x:Static props:ThemeStrings.Theme_GroupTitle}" Tag="step3">
                    <ui:NavigationViewItem.Icon>
                        <ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Personalize}" />
                    </ui:NavigationViewItem.Icon>
                </ui:NavigationViewItem>
                <ui:NavigationViewItem x:Name="NavItemPPT" Content="{x:Static props:OobeStrings.Oobe_NavPPT}" Tag="step4">
                    <ui:NavigationViewItem.Icon>
                        <ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Slideshow}" />
                    </ui:NavigationViewItem.Icon>
                </ui:NavigationViewItem>
                <ui:NavigationViewItem x:Name="NavItemAutomation" Content="{x:Static props:OobeStrings.Oobe_NavAutomation}" Tag="step5">
                    <ui:NavigationViewItem.Icon>
                        <ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Sync}" />
                    </ui:NavigationViewItem.Icon>
                </ui:NavigationViewItem>
                <ui:NavigationViewItem x:Name="NavItemLuckyRandom" Content="{x:Static props:RandomStrings.Random_Title}" Tag="step6">
                    <ui:NavigationViewItem.Icon>
                        <ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.People}" />
                    </ui:NavigationViewItem.Icon>
                </ui:NavigationViewItem>
                <ui:NavigationViewItem x:Name="NavItemAdvanced" Content="{x:Static props:OobeStrings.Oobe_NavAdvanced}" Tag="step7">
                    <ui:NavigationViewItem.Icon>
                        <ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Settings}" />
                    </ui:NavigationViewItem.Icon>
                </ui:NavigationViewItem>
                <ui:NavigationViewItemSeparator />
                <ui:NavigationViewItem x:Name="NavItemFinish" Content="{x:Static props:OobeStrings.Oobe_NavFinish}" Tag="finish">
                    <ui:NavigationViewItem.Icon>
                        <ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Accept}" />
                    </ui:NavigationViewItem.Icon>
                </ui:NavigationViewItem>
            </ui:NavigationView.MenuItems>

            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="*" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>

                <!-- 内容区 -->
                <Grid Grid.Row="0" ClipToBounds="True">

                    <!-- 欢迎页 (居中布局, 不进 ScrollViewer 的滚动条) -->
                    <Grid x:Name="WelcomePanel" Visibility="Visible">
                        <ikw:SimpleStackPanel HorizontalAlignment="Center"
                                              VerticalAlignment="Center"
                                              MaxWidth="640"
                                              Spacing="16">
                            <Border Width="96" Height="96"
                                    HorizontalAlignment="Center"
                                    CornerRadius="20"
                                    Background="{DynamicResource SystemControlBackgroundChromeMediumBrush}">
                                <Image Source="\Resources\icc.ico"
                                       Width="64"
                                       RenderOptions.BitmapScalingMode="HighQuality" />
                            </Border>

                            <TextBlock Text="{x:Static props:OobeStrings.Oobe_WelcomeTitle}"
                                       Style="{DynamicResource TitleLargeTextBlockStyle}"
                                       HorizontalAlignment="Center"
                                       TextAlignment="Center"
                                       Margin="0,8,0,0" />

                            <TextBlock HorizontalAlignment="Center"
                                       TextAlignment="Center"
                                       TextWrapping="Wrap"
                                       Opacity="0.85"
                                       Style="{DynamicResource BodyTextBlockStyle}"
                                       Text="{x:Static props:OobeStrings.Oobe_WelcomeDesc}" />

                            <TextBlock HorizontalAlignment="Center"
                                       TextAlignment="Center"
                                       Opacity="0.6"
                                       Style="{DynamicResource CaptionTextBlockStyle}"
                                       Text="{x:Static props:OobeStrings.Oobe_StepCount}" />

                            <Button x:Name="BtnStartWelcome"
                                    HorizontalAlignment="Center"
                                    MinWidth="180"
                                    Height="36"
                                    Margin="0,12,0,0"
                                    Style="{DynamicResource AccentButtonStyle}"
                                    Click="BtnStartWelcome_Click">
                                <ikw:SimpleStackPanel Orientation="Horizontal" Spacing="8">
                                    <TextBlock Text="{x:Static props:OobeStrings.Oobe_StartStepByStep}" />
                                    <ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.ChevronRight}" FontSize="12" />
                                </ikw:SimpleStackPanel>
                            </Button>

                            <Button x:Name="BtnUsePreset"
                                    HorizontalAlignment="Center"
                                    MinWidth="180"
                                    Height="36"
                                    Click="BtnUsePreset_Click">
                                <ikw:SimpleStackPanel Orientation="Horizontal" Spacing="8">
                                    <ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Repair}" FontSize="12" />
                                    <TextBlock Text="{x:Static props:OobeStrings.Oobe_UsePreset}" />
                                </ikw:SimpleStackPanel>
                            </Button>
                        </ikw:SimpleStackPanel>
                    </Grid>

                    <!-- 步骤页 (8 个) -->
                    <ScrollViewer x:Name="StepScrollViewer"
                                  Visibility="Collapsed"
                                  PanningMode="VerticalFirst"
                                  VerticalScrollBarVisibility="Auto"
                                  HorizontalScrollBarVisibility="Disabled">
                        <Grid Margin="40,16,40,0">
                            <ikw:SimpleStackPanel x:Name="StepHost"
                                                  MaxWidth="900"
                                                  HorizontalAlignment="Stretch"
                                                  Spacing="{StaticResource SettingsCardSpacing}">
                                <ikw:SimpleStackPanel.RenderTransform>
                                    <TranslateTransform x:Name="StepHostTransform" X="0" Y="0" />
                                </ikw:SimpleStackPanel.RenderTransform>

                                <!-- 步骤标题 -->
                                <ikw:SimpleStackPanel Margin="0,0,0,8" Spacing="2">
                                    <TextBlock x:Name="StepIndicatorText"
                                               Style="{DynamicResource CaptionTextBlockStyle}"
                                               Opacity="0.7"
                                               Text="步骤 1 / 8" />
                                    <TextBlock x:Name="StepTitleText"
                                               Style="{DynamicResource TitleTextBlockStyle}"
                                               Text="{x:Static props:OobeStrings.Oobe_Step1Title}" />
                                    <TextBlock x:Name="StepSubtitleText"
                                               Style="{DynamicResource BodyTextBlockStyle}"
                                               Margin="0,2,0,0"
                                               Opacity="0.85"
                                               TextWrapping="Wrap"
                                               Text="{x:Static props:OobeStrings.Oobe_Step1Subtitle}" />
                                </ikw:SimpleStackPanel>

                                <!-- 步骤 1: 启动与隐私 -->
                                <ikw:SimpleStackPanel x:Name="StepTelemetryPanel"
                                                      Spacing="{StaticResource SettingsCardSpacing}">
                                    <TextBlock Style="{StaticResource SettingsSectionHeaderTextBlockStyle}"
                                               Text="{x:Static props:OobeStrings.Oobe_PrivacyTitle}" />

                                    <ui:SettingsExpander Header="{x:Static props:OobeStrings.Oobe_PrivacyTitle}"
                                                         Description="{x:Static props:OobeStrings.Oobe_PrivacyDesc}"
                                                         IsExpanded="True">
                                        <ui:SettingsExpander.HeaderIcon>
                                            <ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Shield}" />
                                        </ui:SettingsExpander.HeaderIcon>
                                        <ui:SettingsExpander.Items>
                                            <ui:SettingsCard ContentAlignment="Left">
                                                <ikw:SimpleStackPanel Orientation="Horizontal" Spacing="4" VerticalAlignment="Center">
                                                    <CheckBox x:Name="CheckBoxPrivacyAccepted"
                                                              VerticalAlignment="Center"
                                                              Checked="CheckBoxPrivacyAccepted_Changed"
                                                              Unchecked="CheckBoxPrivacyAccepted_Changed"
                                                              Content="{x:Static props:OobeStrings.Oobe_AgreePrivacy}" />
                                                    <ui:HyperlinkButton Content="{x:Static props:OobeStrings.Oobe_PrivacyPolicy}"
                                                                        Padding="4,0"
                                                                        VerticalAlignment="Center"
                                                                        Click="HyperlinkPrivacy_Click" />
                                                </ikw:SimpleStackPanel>
                                            </ui:SettingsCard>
                                            <ui:SettingsCard Header="{x:Static props:OobeStrings.Oobe_TelemetryLevel}"
                                                             Description="{x:Static props:OobeStrings.Oobe_TelemetryLevelDesc}">
                                                <ComboBox x:Name="ComboBoxTelemetryUploadLevel">
                                                    <ComboBoxItem Content="{x:Static props:OobeStrings.Oobe_TelemetryNone}" />
                                                    <ComboBoxItem Content="{x:Static props:OobeStrings.Oobe_TelemetryBasic}" />
                                                    <ComboBoxItem Content="{x:Static props:OobeStrings.Oobe_TelemetryOptional}" />
                                                </ComboBox>
                                            </ui:SettingsCard>
                                        </ui:SettingsExpander.Items>
                                    </ui:SettingsExpander>

                                    <TextBlock Style="{StaticResource SettingsSectionHeaderTextBlockStyle}"
                                               Margin="1,18,0,6"
                                               Text="{x:Static props:OobeStrings.Oobe_StartupCrashTitle}" />

                                    <controls:LabeledSettingsCard x:Name="CardFoldAtStartup"
                                                                  Header="{x:Static props:OobeStrings.Oobe_FoldAtStartup}"
                                                                  Description="{x:Static props:OobeStrings.Oobe_FoldAtStartupDesc}"
                                                                  Icon="{x:Static ui:SegoeFluentIcons.ChevronLeft}"
                                                                  SwitchName="ToggleSwitchFoldAtStartup" />

                                    <controls:LabeledSettingsCard x:Name="CardAutoUpdate"
                                                                  Header="{x:Static props:UpdateStrings.Header_AutoUpdate}"
                                                                  Description="{x:Static props:OobeStrings.Oobe_AutoUpdate}"
                                                                  Icon="{x:Static ui:SegoeFluentIcons.Sync}"
                                                                  SwitchName="ToggleSwitchAutoUpdate" />

                                    <ui:SettingsCard Header="{x:Static props:OobeStrings.Oobe_CrashAction}"
                                                     Description="{x:Static props:OobeStrings.Oobe_CrashActionDesc}">
                                        <ui:SettingsCard.HeaderIcon>
                                            <ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Warning}" />
                                        </ui:SettingsCard.HeaderIcon>
                                        <ComboBox x:Name="ComboBoxCrashAction">
                                            <ComboBoxItem Content="{x:Static props:OobeStrings.Oobe_CrashSilentRestart}" />
                                            <ComboBoxItem Content="{x:Static props:OobeStrings.Oobe_CrashNoAction}" />
                                            <ComboBoxItem Content="{x:Static props:OobeStrings.Oobe_CrashShowDialog}" />
                                        </ComboBox>
                                    </ui:SettingsCard>
                                </ikw:SimpleStackPanel>

                                <!-- 步骤 2: 画板与墨迹(含纠正) -->
                                <ikw:SimpleStackPanel x:Name="StepCanvasPanel"
                                                      Spacing="{StaticResource SettingsCardSpacing}"
                                                      Visibility="Collapsed">
                                    <TextBlock Style="{StaticResource SettingsSectionHeaderTextBlockStyle}"
                                               Text="{x:Static props:OobeStrings.Oobe_Step2Title}" />

                                    <controls:LabeledSettingsCard x:Name="CardShowCursor"
                                                                  Header="{x:Static props:CanvasStrings.Canvas_ShowPenCursor}"
                                                                  Description="{x:Static props:OobeStrings.Oobe_ShowPenCursorDesc}"
                                                                  Icon="{x:Static ui:SegoeFluentIcons.TouchPointer}"
                                                                  SwitchName="ToggleSwitchShowCursor" />

                                    <controls:LabeledSettingsCard x:Name="CardDisablePressure"
                                                                  Header="{x:Static props:CanvasStrings.Canvas_IgnorePressure}"
                                                                  Description="{x:Static props:OobeStrings.Oobe_IgnorePressureDesc}"
                                                                  Icon="{x:Static ui:SegoeFluentIcons.Edit}"
                                                                  SwitchName="ToggleSwitchDisablePressure" />

                                    <controls:LabeledSettingsCard x:Name="CardHideStrokeWhenSelecting"
                                                                  Header="{x:Static props:OobeStrings.Oobe_HideInkOnExit}"
                                                                  Description="{x:Static props:OobeStrings.Oobe_HideInkOnExitDesc}"
                                                                  Icon="{x:Static ui:SegoeFluentIcons.Hide}"
                                                                  SwitchName="ToggleSwitchHideStrokeWhenSelecting" />

                                    <TextBlock Style="{StaticResource SettingsSectionHeaderTextBlockStyle}"
                                               Margin="1,18,0,6"
                                               Text="{x:Static props:CanvasStrings.InkRecog_Title}" />

                                    <controls:LabeledSettingsCard x:Name="CardInkToShapeEnabled"
                                                                  Header="{x:Static props:CanvasStrings.InkRecog_EnableInkRecognition}"
                                                                  Description="{x:Static props:OobeStrings.Oobe_InkRecogDesc}"
                                                                  Icon="{x:Static ui:SegoeFluentIcons.Draw}"
                                                                  SwitchName="ToggleSwitchInkToShapeEnabled" />
                                </ikw:SimpleStackPanel>

                                <!-- 步骤 3: 手势 -->
                                <ikw:SimpleStackPanel x:Name="StepGesturesPanel"
                                                      Spacing="{StaticResource SettingsCardSpacing}"
                                                      Visibility="Collapsed">
                                    <TextBlock Style="{StaticResource SettingsSectionHeaderTextBlockStyle}"
                                               Text="{x:Static props:OobeStrings.Oobe_Step3Title}" />

                                    <controls:LabeledSettingsCard x:Name="CardTwoFingerZoom"
                                                                  Header="{x:Static props:OobeStrings.Oobe_EnableTwoFingerZoom}"
                                                                  Icon="{x:Static ui:SegoeFluentIcons.View}"
                                                                  SwitchName="ToggleSwitchTwoFingerZoom" />

                                    <controls:LabeledSettingsCard x:Name="CardTwoFingerTranslate"
                                                                  Header="{x:Static props:OobeStrings.Oobe_EnableTwoFingerPan}"
                                                                  Icon="{x:Static ui:SegoeFluentIcons.Touch}"
                                                                  SwitchName="ToggleSwitchTwoFingerTranslate" />

                                    <controls:LabeledSettingsCard x:Name="CardEnablePalmEraser"
                                                                  Header="{x:Static props:GestureStrings.Gesture_EnablePalmEraser}"
                                                                  Description="{x:Static props:OobeStrings.Oobe_PalmEraserDesc}"
                                                                  Icon="{x:Static ui:SegoeFluentIcons.EraseTool}"
                                                                  SwitchName="ToggleSwitchEnablePalmEraser" />
                                </ikw:SimpleStackPanel>

                                <!-- 步骤 4: 个性化 -->
                                <ikw:SimpleStackPanel x:Name="StepAppearancePanel"
                                                      Spacing="{StaticResource SettingsCardSpacing}"
                                                      Visibility="Collapsed">
                                    <TextBlock Style="{StaticResource SettingsSectionHeaderTextBlockStyle}"
                                               Text="{x:Static props:ThemeStrings.Theme_Label}" />

                                    <ui:SettingsCard Header="{x:Static props:OobeStrings.Oobe_AppTheme}"
                                                     Description="{x:Static props:OobeStrings.Oobe_AppThemeDesc}">
                                        <ui:SettingsCard.HeaderIcon>
                                            <ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Personalize}" />
                                        </ui:SettingsCard.HeaderIcon>
                                        <ComboBox x:Name="ComboBoxTheme">
                                            <ComboBoxItem Content="{x:Static props:OobeStrings.Oobe_ThemeLight}" />
                                            <ComboBoxItem Content="{x:Static props:FloatingBarStrings.OldUI_Dark}" />
                                            <ComboBoxItem Content="{x:Static props:ThemeStrings.Theme_System}" />
                                        </ComboBox>
                                    </ui:SettingsCard>

                                    <ui:SettingsCard Header="{x:Static props:ThemeStrings.Theme_WindowBackdrop}"
                                                     Description="{x:Static props:ThemeStrings.Theme_WindowBackdrop_Description}">
                                        <ui:SettingsCard.HeaderIcon>
                                            <ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.FullScreen}" />
                                        </ui:SettingsCard.HeaderIcon>
                                        <ComboBox x:Name="ComboBoxWindowBackdrop"
                                                  SelectionChanged="ComboBoxWindowBackdrop_SelectionChanged">
                                            <ComboBoxItem Content="{x:Static props:ThemeStrings.Theme_WindowBackdrop_None}" Tag="None" />
                                            <ComboBoxItem Content="{x:Static props:ThemeStrings.Theme_WindowBackdrop_Mica}" Tag="Mica" />
                                            <ComboBoxItem Content="{x:Static props:ThemeStrings.Theme_WindowBackdrop_Acrylic}" Tag="Acrylic" />
                                            <ComboBoxItem Content="Tabbed" Tag="Tabbed" />
                                            <ComboBoxItem Content="Transient" Tag="Transient" />
                                            <ComboBoxItem Content="{x:Static props:ThemeStrings.Theme_WindowBackdrop_Acrylic10}" Tag="Acrylic10" />
                                            <ComboBoxItem Content="{x:Static props:ThemeStrings.Theme_WindowBackdrop_Acrylic11}" Tag="Acrylic11" />
                                        </ComboBox>
                                    </ui:SettingsCard>

                                    <controls:LabeledSettingsCard x:Name="CardEnableSplashScreen"
                                                                  Header="{x:Static props:ThemeStrings.Theme_EnableSplash}"
                                                                  Description="{x:Static props:OobeStrings.Oobe_ShowSplashScreenDesc}"
                                                                  Icon="{x:Static ui:SegoeFluentIcons.Photo}"
                                                                  SwitchName="ToggleSwitchEnableSplashScreen" />

                                    <TextBlock Style="{StaticResource SettingsSectionHeaderTextBlockStyle}"
                                               Margin="1,18,0,6"
                                               Text="{x:Static props:OobeStrings.Oobe_TrayAndQuickPanel}" />

                                    <controls:LabeledSettingsCard x:Name="CardEnableTrayIcon"
                                                                  Header="{x:Static props:OobeStrings.Oobe_EnableTrayIcon}"
                                                                  Description="{x:Static props:OobeStrings.Oobe_EnableTrayIconDesc}"
                                                                  Icon="{x:Static ui:SegoeFluentIcons.Pin}"
                                                                  SwitchName="ToggleSwitchEnableTrayIcon" />

                                    <controls:LabeledSettingsCard x:Name="CardShowQuickPanel"
                                                                  Header="{x:Static props:OobeStrings.Oobe_EnableQuickPanel}"
                                                                  Description="{x:Static props:OobeStrings.Oobe_EnableQuickPanelDesc}"
                                                                  Icon="{x:Static ui:SegoeFluentIcons.ViewAll}"
                                                                  SwitchName="ToggleSwitchShowQuickPanel" />

                                    <TextBlock Style="{StaticResource SettingsSectionHeaderTextBlockStyle}"
                                               Margin="1,18,0,6"
                                               Text="{x:Static props:NavStrings.Nav_Shortcuts}" />

                                    <controls:LabeledSettingsCard x:Name="CardEnableHotkeysInMouseMode"
                                                                  Header="{x:Static props:OobeStrings.Oobe_EnableGlobalHotkeys}"
                                                                  Description="{x:Static props:OobeStrings.Oobe_EnableGlobalHotkeysDesc}"
                                                                  Icon="{x:Static ui:SegoeFluentIcons.PenWorkspace}"
                                                                  SwitchName="ToggleSwitchEnableHotkeysInMouseMode" />
                                </ikw:SimpleStackPanel>

                                <!-- 步骤 5: PowerPoint -->
                                <ikw:SimpleStackPanel x:Name="StepPPTPanel"
                                                      Spacing="{StaticResource SettingsCardSpacing}"
                                                      Visibility="Collapsed">
                                    <TextBlock Style="{StaticResource SettingsSectionHeaderTextBlockStyle}"
                                               Text="{x:Static props:OobeStrings.Oobe_Step5Title}" />

                                    <controls:LabeledSettingsCard x:Name="CardPPTSupport"
                                                                  Header="{x:Static props:OobeStrings.Oobe_EnablePPTLink}"
                                                                  Description="{x:Static props:OobeStrings.Oobe_EnablePPTLinkDesc}"
                                                                  Icon="{x:Static ui:SegoeFluentIcons.Slideshow}"
                                                                  SwitchName="ToggleSwitchPPTSupport" />

                                    <controls:LabeledSettingsCard x:Name="CardPPTAutoSaveStrokes"
                                                                  Header="{x:Static props:OobeStrings.Oobe_AutoSaveStrokes}"
                                                                  Description="{x:Static props:OobeStrings.Oobe_AutoSaveStrokesDesc}"
                                                                  Icon="{x:Static ui:SegoeFluentIcons.Save}"
                                                                  SwitchName="ToggleSwitchPPTAutoSaveStrokes" />

                                    <controls:LabeledSettingsCard x:Name="CardPPTAutoSaveScreenshots"
                                                                  Header="{x:Static props:OobeStrings.Oobe_AutoScreenshot}"
                                                                  Description="{x:Static props:OobeStrings.Oobe_AutoScreenshotDesc}"
                                                                  Icon="{x:Static ui:SegoeFluentIcons.Camera}"
                                                                  SwitchName="ToggleSwitchPPTAutoSaveScreenshots" />

                                    <controls:LabeledSettingsCard x:Name="CardPPTTimeCapsule"
                                                                  Header="{x:Static props:OobeStrings.Oobe_EnableTimeCapsule}"
                                                                  Description="{x:Static props:OobeStrings.Oobe_EnableTimeCapsuleDesc}"
                                                                  Icon="{x:Static ui:SegoeFluentIcons.QuietHours}"
                                                                  SwitchName="ToggleSwitchPPTTimeCapsule" />
                                </ikw:SimpleStackPanel>

                                <!-- 步骤 6: 自动化 + 截图 -->
                                <ikw:SimpleStackPanel x:Name="StepAutomationPanel"
                                                      Spacing="{StaticResource SettingsCardSpacing}"
                                                      Visibility="Collapsed">
                                    <TextBlock Style="{StaticResource SettingsSectionHeaderTextBlockStyle}"
                                               Text="{x:Static props:OobeStrings.Oobe_Step6Title}" />

                                    <controls:LabeledSettingsCard x:Name="CardAutoFoldInPPTSlideShow"
                                                                  Header="{x:Static props:OobeStrings.Oobe_AutoFoldInPPT}"
                                                                  Icon="{x:Static ui:SegoeFluentIcons.ChevronLeft}"
                                                                  SwitchName="ToggleSwitchAutoFoldInPPTSlideShow" />

                                    <controls:LabeledSettingsCard x:Name="CardEnableAutoSaveStrokes"
                                                                  Header="{x:Static props:OobeStrings.Oobe_AutoSaveInk}"
                                                                  Description="{x:Static props:OobeStrings.Oobe_AutoSaveInkDesc}"
                                                                  Icon="{x:Static ui:SegoeFluentIcons.Save}"
                                                                  SwitchName="ToggleSwitchEnableAutoSaveStrokes" />

                                    <controls:LabeledSettingsCard x:Name="CardFloatingWindowInterceptor"
                                                                  Header="{x:Static props:AutomationStrings.FloatingInterceptor_Enable}"
                                                                  Description="{x:Static props:OobeStrings.Oobe_FloatingInterceptorDesc}"
                                                                  Icon="{x:Static ui:SegoeFluentIcons.Cancel}"
                                                                  SwitchName="ToggleSwitchFloatingWindowInterceptor" />

                                    <TextBlock Style="{StaticResource SettingsSectionHeaderTextBlockStyle}"
                                               Margin="1,18,0,6"
                                               Text="{x:Static props:OobeStrings.Oobe_ScreenshotTitle}" />

                                    <controls:LabeledSettingsCard x:Name="CardAutoSaveStrokesAtClear"
                                                                  Header="{x:Static props:OobeStrings.Oobe_AutoSaveScreenshot}"
                                                                  Icon="{x:Static ui:SegoeFluentIcons.Camera}"
                                                                  SwitchName="ToggleSwitchAutoSaveStrokesAtClear" />

                                    <controls:LabeledSettingsCard x:Name="CardSaveScreenshotsInDateFolders"
                                                                  Header="{x:Static props:OobeStrings.Oobe_SaveByDate}"
                                                                  Icon="{x:Static ui:SegoeFluentIcons.Folder}"
                                                                  SwitchName="ToggleSwitchSaveScreenshotsInDateFolders" />
                                </ikw:SimpleStackPanel>

                                <!-- 步骤 7: 随机点名 -->
                                <ikw:SimpleStackPanel x:Name="StepLuckyRandomPanel"
                                                      Spacing="{StaticResource SettingsCardSpacing}"
                                                      Visibility="Collapsed">
                                    <TextBlock Style="{StaticResource SettingsSectionHeaderTextBlockStyle}"
                                               Text="{x:Static props:RandomStrings.Random_Title}" />

                                    <controls:LabeledSettingsCard x:Name="CardShowRandomAndSingleDraw"
                                                                  Header="{x:Static props:OobeStrings.Oobe_ShowRollCallButtons}"
                                                                  Icon="{x:Static ui:SegoeFluentIcons.People}"
                                                                  SwitchName="ToggleSwitchShowRandomAndSingleDraw" />
                                </ikw:SimpleStackPanel>

                                <!-- 步骤 8: 高级 -->
                                <ikw:SimpleStackPanel x:Name="StepAdvancedPanel"
                                                      Spacing="{StaticResource SettingsCardSpacing}"
                                                      Visibility="Collapsed">
                                    <TextBlock Style="{StaticResource SettingsSectionHeaderTextBlockStyle}"
                                               Text="{x:Static props:OobeStrings.Oobe_Step8Title}" />

                                    <controls:LabeledSettingsCard x:Name="CardIsLogEnabled"
                                                                  Header="{x:Static props:OobeStrings.Oobe_EnableLog}"
                                                                  Description="{x:Static props:OobeStrings.Oobe_EnableLogDesc}"
                                                                  Icon="{x:Static ui:SegoeFluentIcons.Document}"
                                                                  SwitchName="ToggleSwitchIsLogEnabled" />
                                </ikw:SimpleStackPanel>

                                <Rectangle Height="32" />
                            </ikw:SimpleStackPanel>
                        </Grid>
                    </ScrollViewer>

                    <!-- 完成页 -->
                    <Grid x:Name="FinishPanel" Visibility="Collapsed">
                        <ScrollViewer VerticalScrollBarVisibility="Auto"
                                      HorizontalScrollBarVisibility="Disabled">
                            <ikw:SimpleStackPanel HorizontalAlignment="Center"
                                                  VerticalAlignment="Top"
                                                  MaxWidth="640"
                                                  Margin="40,32,40,16"
                                                  Spacing="14">
                                <Border Width="80" Height="80"
                                        HorizontalAlignment="Center"
                                        CornerRadius="20"
                                        Background="{DynamicResource SystemControlBackgroundAccentBrush}">
                                    <ui:FontIcon FontSize="40"
                                                 Foreground="White"
                                                 HorizontalAlignment="Center"
                                                 VerticalAlignment="Center"
                                                 Icon="{x:Static ui:SegoeFluentIcons.Accept}" />
                                </Border>

                                <TextBlock Text="{x:Static props:OobeStrings.Oobe_FinishTitle}"
                                           Style="{DynamicResource TitleLargeTextBlockStyle}"
                                           HorizontalAlignment="Center"
                                           TextAlignment="Center"
                                           Margin="0,4,0,0" />

                                <TextBlock HorizontalAlignment="Center"
                                           TextAlignment="Center"
                                           TextWrapping="Wrap"
                                           Opacity="0.85"
                                           Style="{DynamicResource BodyTextBlockStyle}"
                                           Text="{x:Static props:OobeStrings.Oobe_FinishDesc}" />

                                <Border CornerRadius="8"
                                        Padding="16"
                                        Margin="0,8,0,0"
                                        BorderThickness="1"
                                        BorderBrush="{DynamicResource SystemControlForegroundBaseLowBrush}"
                                        Background="{DynamicResource SystemControlBackgroundChromeMediumLowBrush}">
                                    <ikw:SimpleStackPanel x:Name="FinishSummaryHost" Spacing="6" />
                                </Border>
                            </ikw:SimpleStackPanel>
                        </ScrollViewer>
                    </Grid>

                </Grid>

                <!-- Footer -->
                <Border Grid.Row="1"
                        Padding="40,12,40,16"
                        BorderThickness="0,1,0,0"
                        BorderBrush="{DynamicResource SystemControlForegroundBaseLowBrush}">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>

                        <ui:ProgressBar x:Name="StepProgressBar"
                                        Grid.Column="0"
                                        VerticalAlignment="Center"
                                        Margin="0,0,16,0"
                                        MaxWidth="420"
                                        HorizontalAlignment="Stretch"
                                        Minimum="0"
                                        Maximum="100"
                                        Value="0" />

                        <TextBlock Grid.Column="1"
                                   x:Name="FooterStepText"
                                   VerticalAlignment="Center"
                                   Margin="0,0,16,0"
                                   Style="{DynamicResource CaptionTextBlockStyle}"
                                   Opacity="0.7"
                                   Text="" />

                        <Button x:Name="BtnPreviousStep"
                                Grid.Column="2"
                                MinWidth="96"
                                Height="32"
                                Margin="0,0,8,0"
                                Click="BtnPreviousStep_Click">
                            <ikw:SimpleStackPanel Orientation="Horizontal" Spacing="6">
                                <ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Back}" FontSize="12" />
                                <TextBlock Text="{x:Static props:OobeStrings.Oobe_Previous}" />
                            </ikw:SimpleStackPanel>
                        </Button>

                        <Button x:Name="BtnConfirm"
                                Grid.Column="3"
                                MinWidth="140"
                                Height="32"
                                Style="{DynamicResource AccentButtonStyle}"
                                Click="BtnConfirm_Click">
                            <ikw:SimpleStackPanel x:Name="BtnConfirmContent" Orientation="Horizontal" Spacing="6">
                                <TextBlock x:Name="BtnConfirmText" Text="{x:Static props:OobeStrings.Oobe_Next}" />
                                <ui:FontIcon x:Name="BtnConfirmIcon" Icon="{x:Static ui:SegoeFluentIcons.ChevronRight}" FontSize="12" />
                            </ikw:SimpleStackPanel>
                        </Button>
                    </Grid>
                </Border>
            </Grid>
        </ui:NavigationView>
    </Grid>
</Window>
