<Grid xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      Background="#FF101520">
    <Grid.Resources>
        <!-- Inline ControlTemplate wiring up the `PART_ContentHost`
             ScrollViewer that TextBox looks for. Without this, Noesis paints
             the magenta "no-Template" placeholder and typing produces no
             visible text even though KeyDown / Char routes through fine. -->
        <Style TargetType="TextBox" x:Key="PlainBox">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="TextBox">
                        <Border Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}">
                            <!-- `PART_ContentHost` must be a single-child
                                 container so Noesis can inject its internal
                                 TextBoxView. ScrollViewer would be the usual
                                 pick but needs a theme; a bare Decorator
                                 accepts the Child without pulling in any
                                 themed chrome. -->
                            <Decorator x:Name="PART_ContentHost"
                                       Margin="{TemplateBinding Padding}"
                                       VerticalAlignment="Center"/>
                        </Border>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </Grid.Resources>
    <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" MinWidth="420">
        <TextBlock Text="Focus the text box and type — tests Activate + KeyDown/Up + Char."
                   Foreground="#FFE0E2EA" FontFamily="Fonts/#Bitter" FontSize="18"
                   HorizontalAlignment="Center" Margin="0,0,0,20"/>
        <TextBox Text="edit me…" Style="{StaticResource PlainBox}"
                 Width="380" Height="44" Padding="10,6"
                 FontFamily="Fonts/#Bitter" FontSize="22"
                 Background="#FF203258" Foreground="White" CaretBrush="White"
                 BorderBrush="#FF6ABEFF" BorderThickness="2"
                 HorizontalAlignment="Center"/>
        <TextBlock Text="(Try typing letters, arrow keys, backspace, home/end.)"
                   Foreground="#FF8898B5" FontFamily="Fonts/#Bitter" FontSize="14"
                   HorizontalAlignment="Center" Margin="0,16,0,0"/>
    </StackPanel>
</Grid>
