UI/Console/HDTPartitionProperties.xaml
|
<!--
MDT'S "Partition Properties" DIALOG - the modal its Format and Partition Disk page opens for New and for Edit. IT IS A MODAL AND NOT A ROW OF BOXES UNDER THE GRID. A volume has eight things to say about it and two of them are checkboxes; laid out along the bottom of a page they read as filters over the list rather than as the thing being edited, and there is nowhere honest to put OK and Cancel. NOTHING HERE DECIDES ANYTHING. The unit list, what each unit composes, and what the boxes start out holding all come from Get-HDTConsolePartitionRow; this window is the shape they are shown in, and OK hands them back to Add-HDTStepPartition or Set-HDTStepPartition. --> <Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Partition Properties" Width="470" Height="420" WindowStartupLocation="CenterOwner" ResizeMode="NoResize" ShowInTaskbar="False" Background="{DynamicResource HDTPanelBrush}" FontFamily="Segoe UI" FontSize="12"> <Window.Resources> <Style TargetType="TextBlock"> <Setter Property="Foreground" Value="{DynamicResource HDTPanelTextBrush}" /> <Setter Property="VerticalAlignment" Value="Center" /> <Setter Property="Margin" Value="0,0,10,0" /> </Style> <Style TargetType="TextBox"> <!-- WHITE, BECAUSE THESE ARE TYPED IN. HDTFieldBrush is the editor's read-only wash, and using it here would say the opposite. --> <Setter Property="Background" Value="{DynamicResource HDTPanelBrush}" /> <Setter Property="Foreground" Value="{DynamicResource HDTPanelTextBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource HDTBorderBrush}" /> <Setter Property="BorderThickness" Value="1" /> <Setter Property="Padding" Value="6,5,6,5" /> <Setter Property="VerticalContentAlignment" Value="Center" /> </Style> <Style TargetType="CheckBox"> <Setter Property="Foreground" Value="{DynamicResource HDTPanelTextBrush}" /> <Setter Property="VerticalAlignment" Value="Center" /> </Style> <Style TargetType="Button"> <Setter Property="MinWidth" Value="88" /> <Setter Property="Padding" Value="10,5,10,5" /> <Setter Property="Margin" Value="8,0,0,0" /> </Style> </Window.Resources> <Grid Margin="16"> <Grid.RowDefinitions> <RowDefinition Height="Auto" /> <RowDefinition Height="Auto" /> <RowDefinition Height="Auto" /> <RowDefinition Height="Auto" /> <RowDefinition Height="Auto" /> <RowDefinition Height="Auto" /> <RowDefinition Height="Auto" /> <RowDefinition Height="*" /> <RowDefinition Height="Auto" /> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="130" /> <ColumnDefinition Width="*" /> </Grid.ColumnDefinitions> <TextBlock Grid.Row="0" Grid.Column="0" x:Name="HDTVolumeNameLabel" /> <TextBox Grid.Row="0" Grid.Column="1" x:Name="HDTVolumeNameBox" Margin="0,0,0,10" /> <TextBlock Grid.Row="1" Grid.Column="0" x:Name="HDTVolumeTypeLabel" /> <ComboBox Grid.Row="1" Grid.Column="1" x:Name="HDTVolumeTypeBox" Margin="0,0,0,10"> <ComboBoxItem Content="Primary" IsSelected="True" /> <ComboBoxItem Content="EFI" /> <ComboBoxItem Content="Recovery" /> </ComboBox> <!-- MDT PUTS THE PERCENTAGE BEHIND A RADIO PAIR and then has the units dropdown quietly ignore it. Here a percentage is one of the units, which is the same choice said once - and "the rest of the disk" is on the same list because it is the same question. --> <TextBlock Grid.Row="2" Grid.Column="0" x:Name="HDTVolumeSizeLabel" /> <Grid Grid.Row="2" Grid.Column="1" Margin="0,0,0,10"> <Grid.ColumnDefinitions> <ColumnDefinition Width="90" /> <ColumnDefinition Width="*" /> </Grid.ColumnDefinitions> <TextBox Grid.Column="0" x:Name="HDTVolumeSizeBox" Margin="0,0,8,0" /> <ComboBox Grid.Column="1" x:Name="HDTVolumeUnitBox" DisplayMemberPath="Display" /> </Grid> <TextBlock Grid.Row="3" Grid.Column="0" x:Name="HDTVolumeFileSystemLabel" /> <ComboBox Grid.Row="3" Grid.Column="1" x:Name="HDTVolumeFileSystemBox" Margin="0,0,0,10"> <ComboBoxItem Content="(default)" IsSelected="True" /> <ComboBoxItem Content="NTFS" /> <ComboBoxItem Content="FAT32" /> </ComboBox> <TextBlock Grid.Row="4" Grid.Column="0" x:Name="HDTVolumeVariableLabel" /> <TextBox Grid.Row="4" Grid.Column="1" x:Name="HDTVolumeVariableBox" Margin="0,0,0,14" /> <CheckBox Grid.Row="5" Grid.Column="1" x:Name="HDTVolumeQuickFormatCheck" Margin="0,0,0,8" /> <CheckBox Grid.Row="6" Grid.Column="1" x:Name="HDTVolumeBootableCheck" /> <!-- WHAT THE REFUSAL SAYS, WHERE IT WAS CAUSED. OK runs the command; if the command refuses - a size the engine cannot read, a second boot partition - the message lands here rather than in a message box over a dialog that has already closed. --> <TextBlock Grid.Row="7" Grid.ColumnSpan="2" x:Name="HDTVolumeMessageText" Foreground="{DynamicResource HDTErrorBrush}" TextWrapping="Wrap" VerticalAlignment="Bottom" Margin="0,12,0,0" /> <StackPanel Grid.Row="8" Grid.ColumnSpan="2" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,14,0,0"> <Button x:Name="HDTVolumeOkButton" IsDefault="True" /> <!-- NAMED, BUT NOT WIRED. IsCancel is WPF closing its own dialog with DialogResult false and no handler is attached to this button. The name is here for one reason: the string table finds a control by name, and a Cancel with no name is a caption nobody can translate. --> <Button x:Name="HDTCancelButton" IsCancel="True" /> </StackPanel> </Grid> </Window> |