Templates/Wizard/TaskSequence.xaml
|
<!--
A PREVIEW PAGE, NOT A PRODUCT ONE. DESIGN 11.2's real pages live on the SHARE under Scripts\UI so they can be redesigned without rebuilding a boot image; these three exist only so the SHELL can be looked at - the rail, the heading, the swap and the buttons - before any of them are designed. xmlns AND xmlns:x ARE BOTH DECLARED. A page fragment is loaded standalone by XamlReader, not as part of the window, so it carries no namespace by inheritance - and one using x:Name without xmlns:x throws "'x' is an undeclared prefix" at load, which on a bench looks like a wizard that failed to open. --> <Grid xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <Grid.RowDefinitions> <RowDefinition Height="Auto" /> <RowDefinition Height="*" /> </Grid.RowDefinitions> <TextBlock Grid.Row="0" Text="Task sequence" Foreground="#FFCCCCCC" FontSize="14" Margin="0,0,0,8" /> <!-- NO ROWS IN THIS FILE ANY MORE, AND THAT IS W3. It used to carry one <ListBoxItem> per sequence, typed by whoever added the sequence - so a share holding eight sequences offered whatever this file happened to say, which on the lab share was one of them. Get-HDTWizardSequence now reads TaskSequences\ and the host fills this list, so the picker cannot disagree with the share. SelectedValuePath="Id" IS WHAT MAKES IT COLLECTABLE. The page declares that HDTTaskSequenceID is read from SelectedValue, and the host reads that named property and nothing else - so a ListBox and a TextBox are the same thing to it. Without a value path, SelectedValue would be the whole row object and the summary would show a type name where a sequence ID belongs. DisplayMemberPath="Text" IS THE OTHER HALF: the row carries Id, Name, Description and Text, and Text is the one written for a human - "WIN11-LAB - Windows 11 lab build". Without it a ListBox renders each row's ToString(), which is the type name. --> <ListBox Grid.Row="1" x:Name="HDTTaskSequenceList" SelectedValuePath="Id" DisplayMemberPath="Text" Background="#FF252526" Foreground="White" BorderBrush="#FF3A3A3C" FontSize="15" Padding="4" /> </Grid> |