UI/HDTBootStatus.xaml

<Window
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Hephaestus Deployment Toolkit"
    WindowStyle="None"
    ResizeMode="NoResize"
    ShowInTaskbar="False"
    AllowsTransparency="True"
    Background="Transparent"
    SizeToContent="Manual"
    WindowStartupLocation="CenterScreen"
    Width="940"
    Height="300">
 
    <!--
        THE BOOT STATUS OVERLAY: what is on screen between startnet.cmd and the
        first real window.
 
        THE WINDOW IT REPLACES IS cmd.exe's. WinPE boots into cmd.exe running
        startnet.cmd, and that black full-screen console covers the desktop for
        the whole run. A BGInfo start command - the machine's serial, model and
        address painted onto the wallpaper, which is the only reason an
        administrator puts BGInfo in a boot image - draws BEHIND it, so a
        technician never sees any of it. MDT has no console to hide: winpeshl.ini
        makes LiteTouch.wsf the shell, which is why the same BGInfo is on screen
        there from the first second.
 
        Start-HDTDeployment hides the console for that reason - and the moment it
        does, the twenty seconds before the Welcome screen have nothing on them
        at all. This is what goes there.
 
        SO IT IS TRANSPARENT, AND THAT IS THE WHOLE POINT. A second black
        rectangle over the wallpaper would have solved nothing: the wallpaper is
        what the hide was for. AllowsTransparency plus WindowStyle="None" is the
        only combination WPF accepts for a window with no ground of its own, and
        both are required together - one without the other throws at load.
 
        IT HAS A SIZE, AND THE FIRST VERSION DID NOT. It was WindowState=
        "Maximized" - transparent, so covering the screen was supposed not to
        count - because a maximized window needs no arithmetic and this window's
        host is a thin adapter that should have nothing in it worth testing
        (CLAUDE.md rule 1). A VM booted that image and the answer was plain: the
        panel's lines were drawn ACROSS THE WELCOME SCREEN, over the share box
        and the credential fields somebody was meant to type into. Convenience in
        the adapter bought a window that covered the product.
 
        So it is 940x300, CenterScreen, which is where MDT's own progress dialog
        sits and where the Welcome screen and the wizard put their card. A
        technician's eye is already there.
 
        NOT Topmost, AND THE PAYLOAD CLOSES IT BEFORE ANYTHING ELSE OPENS. Both,
        because the first alone was not enough: a transparent window in another
        runspace kept its z-order against a full-screen window opened afterwards
        on the payload's thread. Start-HDTDeployment now takes this down before
        the Welcome screen, the wizard and the progress board alike.
 
        NO BUTTONS, NO TITLE BAR, NO X. It is an account of what is happening,
        not a dialog - the same thing HDTProgress.xaml is, and the WinPE UI
        contract knows the difference. F8 opens a command prompt, wired by
        New-HDTBootStatusHost, and with the console hidden this is the only
        window a technician can reach one from.
 
        NO x:Class AND NO MERGED DICTIONARY, for the reason every window in this
        image carries: there is no compiler in WinPE, and a second file that must
        reach the RAM disk intact is a XamlParseException waiting for the one
        machine nobody can debug.
    -->
 
    <Grid>
 
        <StackPanel
            HorizontalAlignment="Center"
            VerticalAlignment="Center">
 
            <!--
                THE DROP SHADOW IS NOT DECORATION. This text has no ground behind
                it - it is over whatever the wallpaper happens to be - and light
                text on a light wallpaper is text nobody can read. A hard black
                shadow at zero blur behind every glyph is what makes it legible
                on any background, and it is what BGInfo itself does.
            -->
            <StackPanel.Effect>
                <DropShadowEffect Color="#FF000000" BlurRadius="6" ShadowDepth="1" Opacity="0.95" />
            </StackPanel.Effect>
 
            <!--
                THE TWO STRINGS ON THIS WINDOW COME FROM Strings\en-us.psd1's
                BootStatus block, applied by name when the markup loads. Every
                line below them is the payload's own sentence, written at
                runtime - which is why this window carries almost no text at all.
            -->
            <TextBlock
                x:Name="HDTBootStatusHeading"
                FontFamily="Segoe UI"
                FontSize="20"
                FontWeight="SemiBold"
                Foreground="#FFFFFFFF"
                Margin="0,0,0,2" />
 
            <!--
                ONE LINE, AND IT IS THE ONE A TECHNICIAN READS FIRST. Everything
                below is history; this is what the machine is doing now, so it is
                the only thing on this window worth making bigger than the rest.
            -->
            <TextBlock
                x:Name="HDTBootStatusCurrent"
                FontFamily="Segoe UI"
                FontSize="15"
                Foreground="#FF4EC9B0"
                TextTrimming="CharacterEllipsis"
                Margin="0,0,0,10" />
 
            <!--
                THE TAIL. Monospace, because these lines are a log and their
                timestamps should line up; dimmer than the line above, because
                they have already happened.
 
                NoWrap PLUS TextTrimming, AND BOTH HALVES MATTER. A deployment
                line names a UNC path, a rule and a marker file, so it is longer
                than any panel: wrapping would let one sentence eat three rows of
                a twelve-row window and push the rest off the bottom, which is
                the opposite of a tail. Trimming keeps one line to one row.
 
                AND IT WAS CUT MID-CHARACTER BEFORE. Without TextTrimming a long
                line simply ended at the edge - "the boot image was built with
                '\19" - which reads as a truncated VALUE rather than a truncated
                LINE, and somebody would have gone looking for a share called 19.
                The ellipsis is the difference between "there is more of this"
                and "this is what it says".
            -->
            <TextBlock
                x:Name="HDTBootStatusLines"
                FontFamily="Consolas"
                FontSize="13"
                LineHeight="18"
                Foreground="#FFD4D4D4"
                TextWrapping="NoWrap"
                TextTrimming="CharacterEllipsis" />
        </StackPanel>
    </Grid>
</Window>