Desktop/Window.xaml

<!-- PASeasyInstall desktop window: the shell (top bar, message line, page, bottom bar, dialog) and every style.
     The pages are built in Views.ps1 from the controls of Controls.ps1. No x:Class and no events in XAML:
     the file is read with XamlReader.Parse and wired up from App.ps1.
 
     Colour rules: text on any tinted surface is near-white (Text / TextSoft); a status colour is used only for
     its icon, its border and small accents, never for long text. -->
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="PASeasyInstall" Width="900" Height="660" MinWidth="520" MinHeight="380"
        WindowStartupLocation="CenterScreen" FontFamily="Segoe UI" FontSize="13"
        UseLayoutRounding="True" SnapsToDevicePixels="True"
        TextOptions.TextFormattingMode="Display" TextOptions.TextRenderingMode="ClearType"
        Background="#171C23">
  <Window.Resources>
    <!-- ============ palette ============ -->
    <SolidColorBrush x:Key="Bg" Color="#171C23"/>
    <SolidColorBrush x:Key="Bar" Color="#1D232C"/>
    <SolidColorBrush x:Key="Card" Color="#20262F"/>
    <SolidColorBrush x:Key="CardAlt" Color="#252C36"/>
    <SolidColorBrush x:Key="Input" Color="#161A20"/>
    <SolidColorBrush x:Key="Line" Color="#333B47"/>
    <SolidColorBrush x:Key="LineStrong" Color="#465061"/>
    <SolidColorBrush x:Key="Text" Color="#EDF1F7"/>
    <SolidColorBrush x:Key="TextSoft" Color="#C9D1DC"/>
    <SolidColorBrush x:Key="Muted" Color="#8E99AA"/>
 
    <SolidColorBrush x:Key="Accent" Color="#3D8BFD"/>
    <SolidColorBrush x:Key="AccentHover" Color="#5A9DFF"/>
    <SolidColorBrush x:Key="AccentPressed" Color="#2F74DE"/>
    <SolidColorBrush x:Key="AccentFg" Color="#8DB6FF"/>
    <SolidColorBrush x:Key="AccentBg" Color="#1A2840"/>
    <SolidColorBrush x:Key="AccentLine" Color="#2E4C7C"/>
 
    <SolidColorBrush x:Key="OkFg" Color="#5DD39E"/>
    <SolidColorBrush x:Key="OkBg" Color="#152A22"/>
    <SolidColorBrush x:Key="OkLine" Color="#25573F"/>
 
    <SolidColorBrush x:Key="BadFg" Color="#F47C86"/>
    <SolidColorBrush x:Key="BadBg" Color="#2A1B20"/>
    <SolidColorBrush x:Key="BadLine" Color="#5E2C36"/>
 
    <SolidColorBrush x:Key="InfoFg" Color="#8DB6FF"/>
    <SolidColorBrush x:Key="InfoBg" Color="#18243A"/>
    <SolidColorBrush x:Key="InfoLine" Color="#2C4870"/>
 
    <SolidColorBrush x:Key="SimFg" Color="#C3B3FF"/>
    <SolidColorBrush x:Key="SimBg" Color="#272242"/>
    <SolidColorBrush x:Key="SimLine" Color="#41376A"/>
 
    <FontFamily x:Key="Icons">Segoe MDL2 Assets</FontFamily>
 
    <!-- ============ text ============ -->
    <Style TargetType="TextBlock">
      <Setter Property="Foreground" Value="{StaticResource Text}"/>
      <Setter Property="TextWrapping" Value="Wrap"/>
    </Style>
    <Style x:Key="H1" TargetType="TextBlock" BasedOn="{StaticResource {x:Type TextBlock}}">
      <Setter Property="FontSize" Value="22"/>
      <Setter Property="FontWeight" Value="SemiBold"/>
      <Setter Property="Margin" Value="0,0,0,6"/>
    </Style>
    <Style x:Key="H2" TargetType="TextBlock" BasedOn="{StaticResource {x:Type TextBlock}}">
      <Setter Property="FontSize" Value="15"/>
      <Setter Property="FontWeight" Value="SemiBold"/>
      <Setter Property="Margin" Value="0,0,0,10"/>
    </Style>
    <Style x:Key="Lead" TargetType="TextBlock" BasedOn="{StaticResource {x:Type TextBlock}}">
      <Setter Property="Foreground" Value="{StaticResource TextSoft}"/>
      <Setter Property="FontSize" Value="13.5"/>
      <Setter Property="LineHeight" Value="20"/>
    </Style>
    <Style x:Key="Label" TargetType="TextBlock" BasedOn="{StaticResource {x:Type TextBlock}}">
      <Setter Property="Foreground" Value="{StaticResource TextSoft}"/>
      <Setter Property="FontWeight" Value="SemiBold"/>
      <Setter Property="FontSize" Value="12.5"/>
      <Setter Property="Margin" Value="0,0,0,5"/>
    </Style>
    <Style x:Key="ColHead" TargetType="TextBlock" BasedOn="{StaticResource {x:Type TextBlock}}">
      <Setter Property="Foreground" Value="{StaticResource Muted}"/>
      <Setter Property="FontWeight" Value="SemiBold"/>
      <Setter Property="FontSize" Value="12"/>
    </Style>
    <Style x:Key="Hint" TargetType="TextBlock" BasedOn="{StaticResource {x:Type TextBlock}}">
      <Setter Property="Foreground" Value="{StaticResource Muted}"/>
      <Setter Property="FontSize" Value="12"/>
      <Setter Property="LineHeight" Value="17"/>
    </Style>
    <Style x:Key="Icon" TargetType="TextBlock">
      <Setter Property="FontFamily" Value="{StaticResource Icons}"/>
      <Setter Property="FontSize" Value="16"/>
      <Setter Property="VerticalAlignment" Value="Top"/>
    </Style>
 
    <!-- ============ surfaces ============ -->
    <Style x:Key="CardBox" TargetType="Border">
      <Setter Property="Background" Value="{StaticResource Card}"/>
      <Setter Property="BorderBrush" Value="{StaticResource Line}"/>
      <Setter Property="BorderThickness" Value="1"/>
      <Setter Property="CornerRadius" Value="10"/>
      <Setter Property="Padding" Value="18,16"/>
      <Setter Property="Margin" Value="0,0,0,14"/>
    </Style>
 
    <!-- ============ inputs ============ -->
    <!-- Own template: the default Windows theme repaints a disabled or focused box in light grey and blue. -->
    <ControlTemplate x:Key="InputTemplate" TargetType="Control">
      <Border x:Name="b" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}"
              BorderThickness="1" CornerRadius="6">
        <!-- No margin here: TextBox and PasswordBox already apply their Padding inside the content host. -->
        <ScrollViewer x:Name="PART_ContentHost" VerticalAlignment="Center"
                      Focusable="False" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
      </Border>
      <ControlTemplate.Triggers>
        <Trigger Property="IsMouseOver" Value="True">
          <Setter TargetName="b" Property="BorderBrush" Value="{StaticResource LineStrong}"/>
        </Trigger>
        <Trigger Property="IsKeyboardFocusWithin" Value="True">
          <Setter TargetName="b" Property="BorderBrush" Value="{StaticResource Accent}"/>
          <Setter TargetName="b" Property="BorderThickness" Value="1.5"/>
        </Trigger>
        <Trigger Property="IsEnabled" Value="False">
          <Setter Property="Opacity" Value="0.55"/>
        </Trigger>
      </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="InputBase" TargetType="Control">
      <Setter Property="Background" Value="{StaticResource Input}"/>
      <Setter Property="Foreground" Value="{StaticResource Text}"/>
      <Setter Property="BorderBrush" Value="{StaticResource Line}"/>
      <Setter Property="Padding" Value="9,0"/>
      <Setter Property="Height" Value="32"/>
      <Setter Property="FontSize" Value="13"/>
      <Setter Property="Margin" Value="0,3,10,3"/>
      <Setter Property="Template" Value="{StaticResource InputTemplate}"/>
    </Style>
    <Style TargetType="TextBox" BasedOn="{StaticResource InputBase}">
      <Setter Property="CaretBrush" Value="{StaticResource Text}"/>
      <Setter Property="SelectionBrush" Value="{StaticResource Accent}"/>
    </Style>
    <Style TargetType="PasswordBox" BasedOn="{StaticResource InputBase}">
      <Setter Property="CaretBrush" Value="{StaticResource Text}"/>
      <Setter Property="SelectionBrush" Value="{StaticResource Accent}"/>
    </Style>
 
    <!-- A switch instead of a check box: the Advanced toggle. -->
    <Style x:Key="Switch" TargetType="CheckBox">
      <Setter Property="Foreground" Value="{StaticResource TextSoft}"/>
      <Setter Property="Cursor" Value="Hand"/>
      <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
      <Setter Property="Template">
        <Setter.Value>
          <ControlTemplate TargetType="CheckBox">
            <StackPanel Orientation="Horizontal" Background="Transparent">
              <Border x:Name="track" Width="36" Height="20" CornerRadius="10" Background="{StaticResource CardAlt}"
                      BorderBrush="{StaticResource LineStrong}" BorderThickness="1" VerticalAlignment="Center">
                <Ellipse x:Name="knob" Width="12" Height="12" Fill="{StaticResource Muted}" HorizontalAlignment="Left" Margin="4,0,0,0"/>
              </Border>
              <ContentPresenter Margin="8,0,0,0" VerticalAlignment="Center"/>
            </StackPanel>
            <ControlTemplate.Triggers>
              <Trigger Property="IsChecked" Value="True">
                <Setter TargetName="track" Property="Background" Value="{StaticResource Accent}"/>
                <Setter TargetName="track" Property="BorderBrush" Value="{StaticResource Accent}"/>
                <Setter TargetName="knob" Property="Fill" Value="White"/>
                <Setter TargetName="knob" Property="HorizontalAlignment" Value="Right"/>
                <Setter TargetName="knob" Property="Margin" Value="0,0,4,0"/>
              </Trigger>
              <Trigger Property="IsKeyboardFocused" Value="True">
                <Setter TargetName="track" Property="BorderBrush" Value="{StaticResource AccentHover}"/>
              </Trigger>
              <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Foreground" Value="{StaticResource Text}"/>
              </Trigger>
            </ControlTemplate.Triggers>
          </ControlTemplate>
        </Setter.Value>
      </Setter>
    </Style>
 
    <!-- ============ buttons ============ -->
    <Style x:Key="FocusRing">
      <Setter Property="Control.Template">
        <Setter.Value>
          <ControlTemplate>
            <Border Margin="-3" CornerRadius="9" BorderBrush="{StaticResource AccentHover}" BorderThickness="2"/>
          </ControlTemplate>
        </Setter.Value>
      </Setter>
    </Style>
    <Style x:Key="Btn" TargetType="Button">
      <Setter Property="Foreground" Value="{StaticResource Text}"/>
      <Setter Property="Background" Value="{StaticResource CardAlt}"/>
      <Setter Property="BorderBrush" Value="{StaticResource LineStrong}"/>
      <Setter Property="Padding" Value="16,0"/>
      <Setter Property="Height" Value="34"/>
      <Setter Property="FontSize" Value="13"/>
      <Setter Property="Cursor" Value="Hand"/>
      <Setter Property="FocusVisualStyle" Value="{StaticResource FocusRing}"/>
      <Setter Property="Template">
        <Setter.Value>
          <ControlTemplate TargetType="Button">
            <Border x:Name="b" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="1" CornerRadius="7" Padding="{TemplateBinding Padding}">
              <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
            </Border>
            <ControlTemplate.Triggers>
              <Trigger Property="IsMouseOver" Value="True">
                <Setter TargetName="b" Property="Background" Value="#2D3541"/>
              </Trigger>
              <Trigger Property="IsPressed" Value="True">
                <Setter TargetName="b" Property="Background" Value="#20262F"/>
              </Trigger>
              <Trigger Property="IsEnabled" Value="False">
                <Setter Property="Opacity" Value="0.45"/>
              </Trigger>
            </ControlTemplate.Triggers>
          </ControlTemplate>
        </Setter.Value>
      </Setter>
    </Style>
    <Style x:Key="Primary" TargetType="Button" BasedOn="{StaticResource Btn}">
      <Setter Property="Foreground" Value="White"/>
      <Setter Property="Background" Value="{StaticResource Accent}"/>
      <Setter Property="BorderBrush" Value="{StaticResource Accent}"/>
      <Setter Property="FontWeight" Value="SemiBold"/>
      <Setter Property="Padding" Value="20,0"/>
      <Setter Property="Template">
        <Setter.Value>
          <ControlTemplate TargetType="Button">
            <Border x:Name="b" Background="{TemplateBinding Background}" CornerRadius="7" Padding="{TemplateBinding Padding}">
              <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
            </Border>
            <ControlTemplate.Triggers>
              <Trigger Property="IsMouseOver" Value="True">
                <Setter TargetName="b" Property="Background" Value="{StaticResource AccentHover}"/>
              </Trigger>
              <Trigger Property="IsPressed" Value="True">
                <Setter TargetName="b" Property="Background" Value="{StaticResource AccentPressed}"/>
              </Trigger>
              <Trigger Property="IsEnabled" Value="False">
                <Setter TargetName="b" Property="Background" Value="#2A3A55"/>
                <Setter Property="Foreground" Value="#9DB0CC"/>
              </Trigger>
            </ControlTemplate.Triggers>
          </ControlTemplate>
        </Setter.Value>
      </Setter>
    </Style>
    <Style x:Key="Ghost" TargetType="Button" BasedOn="{StaticResource Btn}">
      <Setter Property="Background" Value="Transparent"/>
      <Setter Property="BorderBrush" Value="Transparent"/>
      <Setter Property="Foreground" Value="{StaticResource TextSoft}"/>
    </Style>
 
    <!-- ============ scroll bars: thin, dark ============ -->
    <Style x:Key="ScrollThumb" TargetType="Thumb">
      <Setter Property="Template">
        <Setter.Value>
          <ControlTemplate TargetType="Thumb">
            <Border x:Name="t" CornerRadius="4" Background="#3A4351" Margin="2"/>
            <ControlTemplate.Triggers>
              <Trigger Property="IsMouseOver" Value="True">
                <Setter TargetName="t" Property="Background" Value="#566173"/>
              </Trigger>
              <Trigger Property="IsDragging" Value="True">
                <Setter TargetName="t" Property="Background" Value="#6B778A"/>
              </Trigger>
            </ControlTemplate.Triggers>
          </ControlTemplate>
        </Setter.Value>
      </Setter>
    </Style>
    <Style x:Key="ScrollPage" TargetType="RepeatButton">
      <Setter Property="Focusable" Value="False"/>
      <Setter Property="IsTabStop" Value="False"/>
      <Setter Property="Template">
        <Setter.Value>
          <ControlTemplate TargetType="RepeatButton">
            <Border Background="Transparent"/>
          </ControlTemplate>
        </Setter.Value>
      </Setter>
    </Style>
    <Style TargetType="ScrollBar">
      <Setter Property="Width" Value="12"/>
      <Setter Property="MinWidth" Value="12"/>
      <Setter Property="Template">
        <Setter.Value>
          <ControlTemplate TargetType="ScrollBar">
            <Track x:Name="PART_Track" IsDirectionReversed="True">
              <Track.DecreaseRepeatButton>
                <RepeatButton Style="{StaticResource ScrollPage}" Command="ScrollBar.PageUpCommand"/>
              </Track.DecreaseRepeatButton>
              <Track.Thumb>
                <Thumb Style="{StaticResource ScrollThumb}"/>
              </Track.Thumb>
              <Track.IncreaseRepeatButton>
                <RepeatButton Style="{StaticResource ScrollPage}" Command="ScrollBar.PageDownCommand"/>
              </Track.IncreaseRepeatButton>
            </Track>
          </ControlTemplate>
        </Setter.Value>
      </Setter>
      <Style.Triggers>
        <Trigger Property="Orientation" Value="Horizontal">
          <Setter Property="Width" Value="Auto"/>
          <Setter Property="MinWidth" Value="0"/>
          <Setter Property="Height" Value="12"/>
          <Setter Property="Template">
            <Setter.Value>
              <ControlTemplate TargetType="ScrollBar">
                <Track x:Name="PART_Track">
                  <Track.DecreaseRepeatButton>
                    <RepeatButton Style="{StaticResource ScrollPage}" Command="ScrollBar.PageLeftCommand"/>
                  </Track.DecreaseRepeatButton>
                  <Track.Thumb>
                    <Thumb Style="{StaticResource ScrollThumb}"/>
                  </Track.Thumb>
                  <Track.IncreaseRepeatButton>
                    <RepeatButton Style="{StaticResource ScrollPage}" Command="ScrollBar.PageRightCommand"/>
                  </Track.IncreaseRepeatButton>
                </Track>
              </ControlTemplate>
            </Setter.Value>
          </Setter>
        </Trigger>
      </Style.Triggers>
    </Style>
 
    <Style TargetType="ToolTip">
      <Setter Property="Background" Value="#2B323D"/>
      <Setter Property="Foreground" Value="{StaticResource Text}"/>
      <Setter Property="BorderBrush" Value="{StaticResource LineStrong}"/>
      <Setter Property="Padding" Value="8,5"/>
    </Style>
 
    <SolidColorBrush x:Key="WarnFg" Color="#F2C265"/>
    <SolidColorBrush x:Key="WarnBg" Color="#2B2416"/>
    <SolidColorBrush x:Key="WarnLine" Color="#5C4A22"/>
 
    <!-- ============ more buttons ============ -->
    <Style x:Key="Small" TargetType="Button" BasedOn="{StaticResource Btn}">
      <Setter Property="Height" Value="28"/>
      <Setter Property="Padding" Value="12,0"/>
      <Setter Property="FontSize" Value="12.5"/>
    </Style>
    <Style x:Key="Big" TargetType="Button" BasedOn="{StaticResource Btn}">
      <Setter Property="Height" Value="42"/>
      <Setter Property="Padding" Value="22,0"/>
      <Setter Property="FontSize" Value="14"/>
    </Style>
    <Style x:Key="PrimaryBig" TargetType="Button" BasedOn="{StaticResource Primary}">
      <Setter Property="Height" Value="42"/>
      <Setter Property="Padding" Value="26,0"/>
      <Setter Property="FontSize" Value="14"/>
    </Style>
    <Style x:Key="Danger" TargetType="Button" BasedOn="{StaticResource Btn}">
      <Setter Property="Foreground" Value="{StaticResource BadFg}"/>
      <Setter Property="BorderBrush" Value="{StaticResource BadLine}"/>
      <Setter Property="Background" Value="{StaticResource BadBg}"/>
    </Style>
    <!-- A step of the step line: looks like text, can be pressed when the step was reached. -->
    <Style x:Key="StepButton" TargetType="Button">
      <Setter Property="Cursor" Value="Hand"/>
      <Setter Property="FocusVisualStyle" Value="{StaticResource FocusRing}"/>
      <Setter Property="Template">
        <Setter.Value>
          <ControlTemplate TargetType="Button">
            <Border Background="Transparent" Padding="2,4">
              <ContentPresenter VerticalAlignment="Center"/>
            </Border>
          </ControlTemplate>
        </Setter.Value>
      </Setter>
      <Style.Triggers>
        <Trigger Property="IsEnabled" Value="False">
          <Setter Property="Cursor" Value="Arrow"/>
        </Trigger>
      </Style.Triggers>
    </Style>
    <!-- A choice card: a lab, a Vault option, a domain option. Selected (Tag = selected): accent border, tinted surface. -->
    <Style x:Key="Choice" TargetType="Button">
      <Setter Property="Background" Value="{StaticResource Card}"/>
      <Setter Property="BorderBrush" Value="{StaticResource Line}"/>
      <Setter Property="Cursor" Value="Hand"/>
      <Setter Property="Margin" Value="0,0,10,10"/>
      <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
      <Setter Property="VerticalContentAlignment" Value="Top"/>
      <Setter Property="FocusVisualStyle" Value="{StaticResource FocusRing}"/>
      <Setter Property="Template">
        <Setter.Value>
          <ControlTemplate TargetType="Button">
            <Border x:Name="b" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="1.5" CornerRadius="10" Padding="14,12">
              <ContentPresenter HorizontalAlignment="Stretch" VerticalAlignment="Top"/>
            </Border>
            <ControlTemplate.Triggers>
              <Trigger Property="IsMouseOver" Value="True">
                <Setter TargetName="b" Property="BorderBrush" Value="{StaticResource LineStrong}"/>
              </Trigger>
              <Trigger Property="Tag" Value="selected">
                <Setter TargetName="b" Property="BorderBrush" Value="{StaticResource Accent}"/>
                <Setter TargetName="b" Property="Background" Value="{StaticResource AccentBg}"/>
              </Trigger>
            </ControlTemplate.Triggers>
          </ControlTemplate>
        </Setter.Value>
      </Setter>
    </Style>
    <!-- A check box that fits the dark window. -->
    <Style x:Key="Check" TargetType="CheckBox">
      <Setter Property="Foreground" Value="{StaticResource TextSoft}"/>
      <Setter Property="Cursor" Value="Hand"/>
      <Setter Property="Margin" Value="0,8,0,0"/>
      <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
      <Setter Property="Template">
        <Setter.Value>
          <ControlTemplate TargetType="CheckBox">
            <DockPanel Background="Transparent">
              <Border x:Name="box" DockPanel.Dock="Left" Width="18" Height="18" CornerRadius="4" Background="{StaticResource Input}"
                      BorderBrush="{StaticResource LineStrong}" BorderThickness="1" VerticalAlignment="Top" Margin="0,1,9,0">
                <TextBlock x:Name="mark" FontFamily="{StaticResource Icons}" Text="&#xE73E;" FontSize="11" Foreground="White"
                           HorizontalAlignment="Center" VerticalAlignment="Center" Visibility="Collapsed"/>
              </Border>
              <ContentPresenter VerticalAlignment="Center"/>
            </DockPanel>
            <ControlTemplate.Triggers>
              <Trigger Property="IsChecked" Value="True">
                <Setter TargetName="box" Property="Background" Value="{StaticResource Accent}"/>
                <Setter TargetName="box" Property="BorderBrush" Value="{StaticResource Accent}"/>
                <Setter TargetName="mark" Property="Visibility" Value="Visible"/>
              </Trigger>
              <Trigger Property="IsKeyboardFocused" Value="True">
                <Setter TargetName="box" Property="BorderBrush" Value="{StaticResource AccentHover}"/>
              </Trigger>
            </ControlTemplate.Triggers>
          </ControlTemplate>
        </Setter.Value>
      </Setter>
    </Style>
    <!-- Text that can be selected and copied: commands, error texts. -->
    <Style x:Key="Pre" TargetType="TextBox">
      <Setter Property="IsReadOnly" Value="True"/>
      <Setter Property="FontFamily" Value="Consolas"/>
      <Setter Property="FontSize" Value="12"/>
      <Setter Property="Foreground" Value="{StaticResource TextSoft}"/>
      <Setter Property="Background" Value="{StaticResource Input}"/>
      <Setter Property="BorderBrush" Value="{StaticResource Line}"/>
      <Setter Property="Padding" Value="10,8"/>
      <Setter Property="TextWrapping" Value="Wrap"/>
      <Setter Property="Margin" Value="0,8,0,0"/>
      <Setter Property="SelectionBrush" Value="{StaticResource Accent}"/>
      <Setter Property="Template">
        <Setter.Value>
          <ControlTemplate TargetType="TextBox">
            <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1" CornerRadius="6">
              <ScrollViewer x:Name="PART_ContentHost" Focusable="False" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
            </Border>
          </ControlTemplate>
        </Setter.Value>
      </Setter>
    </Style>
 
    <!-- ============ rows of lists that are filled from data ============ -->
    <!-- One check of the server check (Advanced). Result: ok, problem, skipped. -->
    <DataTemplate x:Key="CheckRow">
      <Border x:Name="row" Padding="16,8">
        <Grid>
          <Grid.ColumnDefinitions>
            <ColumnDefinition SharedSizeGroup="cResult"/>
            <ColumnDefinition SharedSizeGroup="cServer"/>
            <ColumnDefinition SharedSizeGroup="cCheck"/>
            <ColumnDefinition Width="*"/>
          </Grid.ColumnDefinitions>
          <Border x:Name="pill" Grid.Column="0" CornerRadius="10" Padding="9,1" Margin="0,0,16,0"
                  HorizontalAlignment="Left" VerticalAlignment="Top" Background="#2A313C">
            <TextBlock x:Name="pillText" Text="{Binding Result}" FontSize="11.5" FontWeight="SemiBold" Foreground="#B5BFCD"/>
          </Border>
          <StackPanel Grid.Column="1" Margin="0,0,16,0">
            <TextBlock Text="{Binding Server}" Foreground="#EDF1F7"/>
            <TextBlock Text="{Binding Address}" Foreground="#8E99AA" FontSize="11.5"/>
          </StackPanel>
          <TextBlock Grid.Column="2" Text="{Binding Check}" Foreground="#C9D1DC" Margin="0,0,16,0"/>
          <TextBlock Grid.Column="3" Text="{Binding Detail}" Foreground="#C9D1DC" TextWrapping="Wrap"/>
        </Grid>
      </Border>
      <DataTemplate.Triggers>
        <DataTrigger Binding="{Binding (ItemsControl.AlternationIndex), RelativeSource={RelativeSource TemplatedParent}}" Value="1">
          <Setter TargetName="row" Property="Background" Value="#232A33"/>
        </DataTrigger>
        <DataTrigger Binding="{Binding Result}" Value="ok">
          <Setter TargetName="pill" Property="Background" Value="#152A22"/>
          <Setter TargetName="pillText" Property="Foreground" Value="#5DD39E"/>
        </DataTrigger>
        <DataTrigger Binding="{Binding Result}" Value="problem">
          <Setter TargetName="pill" Property="Background" Value="#2A1B20"/>
          <Setter TargetName="pillText" Property="Foreground" Value="#F47C86"/>
        </DataTrigger>
      </DataTemplate.Triggers>
    </DataTemplate>
    <!-- One line of the activity log. Kind: ok, run, warn, bad or empty; it colours the bar on the left. -->
    <DataTemplate x:Key="LogRow">
      <Border x:Name="bar" BorderThickness="3,0,0,0" BorderBrush="#333B47" Padding="9,3,6,3" Margin="0,0,0,1">
        <Grid>
          <Grid.ColumnDefinitions>
            <ColumnDefinition Width="62"/>
            <ColumnDefinition Width="96"/>
            <ColumnDefinition Width="170"/>
            <ColumnDefinition Width="*"/>
          </Grid.ColumnDefinitions>
          <TextBlock Grid.Column="0" Text="{Binding Time}" Foreground="#8E99AA" FontSize="12" FontFamily="Consolas"/>
          <TextBlock Grid.Column="1" Text="{Binding Component}" Foreground="#C9D1DC" FontSize="12" TextTrimming="CharacterEllipsis" Margin="0,0,8,0"/>
          <TextBlock Grid.Column="2" Text="{Binding Step}" Foreground="#C9D1DC" FontSize="12" TextTrimming="CharacterEllipsis" Margin="0,0,8,0"/>
          <TextBlock Grid.Column="3" Text="{Binding Message}" Foreground="#EDF1F7" FontSize="12" TextWrapping="Wrap"/>
        </Grid>
      </Border>
      <DataTemplate.Triggers>
        <DataTrigger Binding="{Binding Kind}" Value="ok">
          <Setter TargetName="bar" Property="BorderBrush" Value="#5DD39E"/>
        </DataTrigger>
        <DataTrigger Binding="{Binding Kind}" Value="run">
          <Setter TargetName="bar" Property="BorderBrush" Value="#3D8BFD"/>
        </DataTrigger>
        <DataTrigger Binding="{Binding Kind}" Value="warn">
          <Setter TargetName="bar" Property="BorderBrush" Value="#F2C265"/>
        </DataTrigger>
        <DataTrigger Binding="{Binding Kind}" Value="bad">
          <Setter TargetName="bar" Property="BorderBrush" Value="#F47C86"/>
          <Setter TargetName="bar" Property="Background" Value="#2A1B20"/>
        </DataTrigger>
      </DataTemplate.Triggers>
    </DataTemplate>
  </Window.Resources>
 
 
  <Grid x:Name="Shell" Background="{StaticResource Bg}">
    <DockPanel x:Name="Main">
      <!-- ============ top bar: brand, steps, simulation badge, Advanced ============ -->
      <Border DockPanel.Dock="Top" Background="{StaticResource Bar}" BorderBrush="{StaticResource Line}" BorderThickness="0,0,0,1" Padding="14,0" Height="52">
        <DockPanel LastChildFill="False" VerticalAlignment="Center">
          <Button x:Name="NavHome" DockPanel.Dock="Left" Style="{StaticResource Ghost}" Padding="6,0" ToolTip="Back to the start page"
                  AutomationProperties.Name="PASeasyInstall, back to the start page">
            <StackPanel Orientation="Horizontal">
              <Image x:Name="BrandIcon" Width="20" Height="20" Margin="0,0,8,0"/>
              <TextBlock Text="PASeasyInstall" FontWeight="Bold" FontSize="14" Foreground="{StaticResource Text}"/>
            </StackPanel>
          </Button>
          <StackPanel x:Name="Steps" DockPanel.Dock="Left" Orientation="Horizontal" Margin="18,0,0,0" VerticalAlignment="Center"/>
          <CheckBox x:Name="OptAdvanced" DockPanel.Dock="Right" Style="{StaticResource Switch}" Content="Advanced" Margin="14,0,0,0"
                    ToolTip="Show the settings most labs never need" Visibility="Collapsed"/>
          <Border x:Name="SimBadge" DockPanel.Dock="Right" Background="{StaticResource SimBg}" BorderBrush="{StaticResource SimLine}" BorderThickness="1"
                  CornerRadius="11" Padding="9,2" VerticalAlignment="Center" Visibility="Collapsed"
                  ToolTip="Simulated installer: no server is contacted">
            <StackPanel Orientation="Horizontal">
              <TextBlock Style="{StaticResource Icon}" Text="&#xE7FC;" FontSize="11" Foreground="{StaticResource SimFg}" Margin="0,1,6,0" VerticalAlignment="Center"/>
              <TextBlock Text="Simulation" Foreground="{StaticResource SimFg}" FontSize="11.5" FontWeight="SemiBold"/>
            </StackPanel>
          </Border>
        </DockPanel>
      </Border>
 
      <!-- ============ message line, in view wherever the page is scrolled to ============ -->
      <Border x:Name="Notice" DockPanel.Dock="Top" Padding="18,9" BorderThickness="0,0,0,1" Visibility="Collapsed">
        <DockPanel>
          <ContentControl x:Name="NoticeIcon" DockPanel.Dock="Left" Width="16" Height="16" Margin="0,0,10,0" VerticalAlignment="Center" Focusable="False"/>
          <TextBlock x:Name="NoticeText" VerticalAlignment="Center" Foreground="{StaticResource Text}"/>
        </DockPanel>
      </Border>
 
      <!-- ============ bottom bar: only on the four steps ============ -->
      <Border x:Name="Bar" DockPanel.Dock="Bottom" Background="{StaticResource Bar}" BorderBrush="{StaticResource Line}" BorderThickness="0,1,0,0" Padding="16,10" Visibility="Collapsed">
        <DockPanel>
          <Button x:Name="BtnBack" DockPanel.Dock="Left" Style="{StaticResource Btn}" AutomationProperties.Name="Back">
            <StackPanel Orientation="Horizontal">
              <TextBlock Style="{StaticResource Icon}" Text="&#xE72B;" FontSize="12" Margin="0,1,8,0" VerticalAlignment="Center" Foreground="{StaticResource TextSoft}"/>
              <TextBlock Text="Back" Foreground="{StaticResource Text}"/>
            </StackPanel>
          </Button>
          <Button x:Name="BtnNext" DockPanel.Dock="Right" Style="{StaticResource Primary}">
            <StackPanel Orientation="Horizontal">
              <ContentControl x:Name="NextBusy" Width="14" Height="14" Margin="0,0,9,0" VerticalAlignment="Center" Focusable="False" Visibility="Collapsed"/>
              <TextBlock x:Name="NextText" Text="Next" Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType=Button}}"/>
              <TextBlock x:Name="NextArrow" Style="{StaticResource Icon}" Text="&#xE72A;" FontSize="12" Margin="10,1,0,0" VerticalAlignment="Center"
                         Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType=Button}}"/>
            </StackPanel>
          </Button>
          <TextBlock x:Name="BarText" Style="{StaticResource Hint}" VerticalAlignment="Center" Margin="14,0"/>
        </DockPanel>
      </Border>
 
      <!-- ============ page ============ -->
      <ScrollViewer x:Name="Page" VerticalScrollBarVisibility="Auto" Focusable="False">
        <StackPanel x:Name="PageHost" MaxWidth="880" Margin="24,22,24,10"/>
      </ScrollViewer>
    </DockPanel>
 
    <!-- ============ dialog: a question, or the accounts of an installation ============ -->
    <Border x:Name="Overlay" Background="#B30E1116" Visibility="Collapsed">
      <Border Background="{StaticResource Card}" BorderBrush="{StaticResource LineStrong}" BorderThickness="1" CornerRadius="12"
              Padding="22,20" MaxWidth="520" MinWidth="340" HorizontalAlignment="Center" VerticalAlignment="Center">
        <StackPanel>
          <TextBlock x:Name="DialogTitle" Style="{StaticResource H2}"/>
          <TextBlock x:Name="DialogText" Style="{StaticResource Lead}"/>
          <ScrollViewer MaxHeight="300" VerticalScrollBarVisibility="Auto" Focusable="False" Margin="0,12,0,0">
            <StackPanel x:Name="DialogFields"/>
          </ScrollViewer>
          <TextBlock x:Name="DialogHint" Style="{StaticResource Hint}" Margin="0,8,0,0" Visibility="Collapsed"
                     Text="Passwords are kept in memory only. This window was opened after the installation started, so it asks again."/>
          <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,18,0,0">
            <Button x:Name="DialogNo" Style="{StaticResource Btn}" Content="Cancel" Margin="0,0,10,0" IsCancel="True"/>
            <Button x:Name="DialogYes" Style="{StaticResource Primary}" Content="OK" IsDefault="True"/>
          </StackPanel>
        </StackPanel>
      </Border>
    </Border>
  </Grid>
</Window>