Projects/DiskImageGUI.xaml

<Controls:MetroWindow
    xmlns = "http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x = "http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
    xmlns:Controls = "clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
 
    Title = "OSDeploy"
    Width = "900"
    Height = "700"
    Background = "#004275"
 
    BorderBrush = "{DynamicResource AccentColorBrush}"
    BorderThickness = "2"
 
    ResizeMode = "CanResizeWithGrip"
    WindowStartupLocation = "CenterScreen"
    >
 
    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <!-- MahApps.Metro resource dictionaries. Make sure that all file names are Case Sensitive! -->
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colors.xaml" />
            </ResourceDictionary.MergedDictionaries>
 
            <Style TargetType="{x:Type Window}">
                <Setter Property="FontFamily" Value="Segoe UI" />
                <Setter Property="FontWeight" Value="Light" />
                <Setter Property="Background" Value="#1f1f1f" />
                <Setter Property="Foreground" Value="white" />
            </Style>
 
            <Style TargetType="{x:Type Button}">
                <Setter Property="Background" Value="#FF1D3245" />
                <Setter Property="Foreground" Value="#FFE8EDF9" />
                <Setter Property="FontSize" Value="15" />
                <Setter Property="SnapsToDevicePixels" Value="True" />
 
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="Button" >
                            <Border Name = "Border"
                                BorderThickness = "1"
                                Padding = "4,2"
                                BorderBrush = "#336891"
                                CornerRadius = "1"
                                Background = "#0078d7">
                                <ContentPresenter HorizontalAlignment = "Center" VerticalAlignment = "Center" TextBlock.TextAlignment = "Center" />
                            </Border>
 
                            <ControlTemplate.Triggers>
                                <Trigger Property = "IsFocused" Value = "False">
                                    <Setter TargetName = "Border" Property = "BorderBrush" Value = "#336891" />
                                    <Setter Property = "Button.Background" Value = "#336891" />
                                </Trigger>
                                <Trigger Property = "IsMouseOver" Value="True">
                                    <Setter TargetName = "Border" Property = "BorderBrush" Value = "#FFE8EDF9" />
                                </Trigger>
                                <Trigger Property = "IsEnabled" Value = "False">
                                    <Setter TargetName = "Border" Property = "BorderBrush" Value = "#336891" />
                                    <Setter Property = "Button.Foreground" Value = "#336891" />
                                </Trigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
 
            <Style TargetType="{x:Type Label}">
                <Setter Property = "FontFamily" Value = "Segoe UI" />
            </Style>
 
            <Style TargetType="{x:Type TextBox}">
                <Setter Property = "FontFamily" Value = "Segoe UI" />
            </Style>
 
            <Style TargetType="{x:Type ComboBox}">
                <Setter Property = "FontFamily" Value = "Segoe UI" />
            </Style>
 
        </ResourceDictionary>
    </Window.Resources>
 
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="100"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="700"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="100"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="65"/>
            <RowDefinition Height="25"/>
            <RowDefinition Height="10"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="10"/>
            <RowDefinition Height="120"/>
            <RowDefinition Height="10"/>
        </Grid.RowDefinitions>
 
        <!--Title -->
        <StackPanel Grid.Column = "0" Grid.ColumnSpan = "5" Grid.Row = "0" VerticalAlignment = "Top">
            <Label Name = "LabelTitle"
            Content = ""
            FontFamily = "Segoe UI Light" FontSize = "46"
            Foreground = "White"
            HorizontalAlignment = "Center"
            VerticalAlignment = "Top"
            />
        </StackPanel>
 
        <!--SubTitle -->
        <StackPanel Grid.Column = "0" Grid.ColumnSpan = "5" Grid.Row = "1" VerticalAlignment = "Top">
            <Label Name = "LabelSubtitle"
            Content = ""
            FontFamily = "Segoe UI" FontSize = "15"
            Foreground = "White"
            HorizontalAlignment = "Center"
            />
        </StackPanel>
 
        <!-- Version -->
        <StackPanel Grid.Column = "0" Grid.ColumnSpan = "1" Grid.Row = "0" VerticalAlignment = "Top">
            <Label Name = "LabelVersion"
            Content = ""
            FontFamily = "Segoe UI" FontSize = "11"
            Foreground = "White"
            HorizontalAlignment = "Left"
            Padding = "10,1,10,0"
            />
        </StackPanel>
 
        <!-- System Information -->
        <StackPanel Grid.Column = "0" Grid.ColumnSpan = "3" Grid.Row = "5" VerticalAlignment = "Bottom" HorizontalAlignment = "Left">
            <Label Name = "LabelManufacturer"
            Content = ""
            FontFamily = "Segoe UI" FontSize = "11"
            Foreground = "White"
            Padding = "10,1,10,0"
            />
 
            <Label Name = "LabelModel"
            Content = ""
            FontFamily = "Segoe UI" FontSize = "11"
            Foreground = "White"
            Padding = "10,1,10,0"
            />
 
            <Label Name = "LabelSerialNumber"
            Content = ""
            FontFamily = "Segoe UI" FontSize = "11"
            Foreground = "White"
            Padding = "10,1,10,0"
            />
 
            <Label Name = "LabelBiosVersion"
            Content = ""
            FontFamily = "Segoe UI"
            FontSize = "11"
            Foreground = "White"
            Padding = "10,1,10,0"
            />
        </StackPanel>
 
        <!-- TPM -->
        <StackPanel Grid.Column = "5" Grid.ColumnSpan = "1" Grid.Row = "5" VerticalAlignment = "Bottom" HorizontalAlignment = "Right">
 
            <Label Name = "LabelTpmVersion"
            Content = ""
            FontFamily = "Segoe UI"
            FontSize = "11"
            Foreground = "White"
            HorizontalAlignment = "Right"
            Padding = "10,1,10,0"
            />
        </StackPanel>
 
        <!-- Dism Action -->
        <StackPanel Grid.Column = "2" Grid.ColumnSpan = "1" Grid.Row = "3" VerticalAlignment = "Top">
            <!-- DismActionStack -->
            <StackPanel x:Name = "DismActionStack" Orientation = "Horizontal" HorizontalAlignment = "Right" VerticalAlignment = "Top" Margin = "7">
                <Label Name = "DismActionLabel"
                Content = ""
                FontFamily = "Segoe UI" FontSize = "15"
                Foreground = "White"
                VerticalAlignment = "Center"
                />
 
                <ComboBox Name = "DismActionCombobox"
                BorderThickness = "2"
                FontFamily = "Segoe UI"
                FontSize = "15"
                FontWeight = "Normal"
                Foreground = "Black"
                Height = "40"
                IsEditable = "False"
                Padding = "8"
                Width = "575"
                VerticalAlignment = "Center"
                />
            </StackPanel>
 
            <!-- SourceStack -->
            <StackPanel x:Name = "DismSourceStack" Orientation = "Horizontal" HorizontalAlignment = "Right" VerticalAlignment = "Center" Margin = "7">
 
                <Label Name = "DismSourceLabel"
                Content = "Source"
                FontFamily = "Segoe UI"
                FontSize = "15"
                Foreground = "White"
                VerticalAlignment = "Center"
                Visibility = "Collapsed"
                />
 
                <ComboBox Name = "DismSourceCombobox"
                BorderThickness = "2"
                FontFamily = "Segoe UI"
                FontSize = "15"
                FontWeight = "Normal"
                Foreground = "Black"
                Height = "40"
                Width = "575"
                Padding = "8"
                VerticalAlignment = "Center"
                Visibility = "Collapsed"
                />
            </StackPanel>
 
            <!-- DestinationStack -->
            <StackPanel x:Name = "DismDestinationStack" Orientation = "Horizontal" HorizontalAlignment = "Right" VerticalAlignment = "Center" Margin = "7">
 
                <Label Name = "DismDestinationLabel"
                Content = "Destination"
                FontFamily = "Segoe UI"
                FontSize = "15"
                Foreground = "White"
                VerticalAlignment = "Center"
                Visibility = "Collapsed"
                />
 
                <ComboBox Name = "DismDestinationCombobox"
                BorderThickness = "2"
                FontFamily = "Segoe UI"
                FontSize = "15"
                FontWeight = "Normal"
                Foreground = "Black"
                Height = "40"
                Width = "575"
                Padding = "8"
                VerticalAlignment = "Center"
                Visibility = "Collapsed"
                />
            </StackPanel>
 
            <!-- NameStack -->
            <StackPanel x:Name = "DismNameStack" Orientation = "Horizontal" HorizontalAlignment = "Right" VerticalAlignment = "Center" Margin = "7">
                <Label Name = "DismNameLabel"
                Content = "/Name:"
                FontFamily = "Segoe UI"
                FontSize = "15"
                Foreground = "White"
                VerticalAlignment = "Center"
                Visibility = "Collapsed"
                />
 
                <TextBox Name = "DismNameTextbox"
                Background = "#002846"
                BorderThickness = "2"
                FontFamily = "Segoe UI"
                FontSize = "15"
                FontWeight = "Normal"
                Foreground = "White"
                Height = "40"
                Text = ""
                Width = "575"
                Padding = "8"
                VerticalAlignment = "Center"
                Visibility = "Collapsed"
                />
            </StackPanel>
 
            <!-- DescriptionStack -->
            <StackPanel x:Name = "DismDescriptionStack" Orientation = "Horizontal" HorizontalAlignment = "Right" VerticalAlignment = "Center" Margin = "7">
                <Label Name = "DismDescriptionLabel"
                Content = "/Description:"
                FontFamily = "Segoe UI"
                FontSize = "15"
                Foreground = "White"
                VerticalAlignment = "Center"
                Visibility = "Collapsed"
                />
 
                <TextBox Name = "DismDescriptionTextbox"
                Background = "#002846"
                BorderThickness = "2"
                FontFamily = "Segoe UI"
                FontSize = "15"
                FontWeight = "Normal"
                Foreground = "White"
                Height = "40"
                Text = ""
                Width = "575"
                Padding = "8"
                VerticalAlignment = "Center"
                Visibility = "Collapsed"
                />
            </StackPanel>
 
            <!-- CompressStack -->
            <StackPanel x:Name = "DismCompressStack" Orientation = "Horizontal" HorizontalAlignment = "Right" VerticalAlignment = "Center" Margin = "7">
 
                <Label Name = "DismCompressLabel"
                Content = "/Compress:"
                FontFamily = "Segoe UI"
                FontSize = "15"
                Foreground = "White"
                VerticalAlignment = "Center"
                Visibility = "Collapsed"
                />
 
                <ComboBox Name = "DismCompressCombobox"
                BorderThickness = "2"
                FontFamily = "Segoe UI"
                FontSize = "15"
                FontWeight = "Normal"
                Foreground = "Black"
                Height = "40"
                IsEditable = "False"
                Width = "575"
                Padding = "8"
                VerticalAlignment = "Center"
                Visibility = "Collapsed"
                />
            </StackPanel>
 
            <!-- StartButton -->
            <StackPanel Orientation = "Horizontal" HorizontalAlignment = "Right" VerticalAlignment = "Center" Margin = "7">
                <Button Name = "StartButton"
                Content = "Start"
                FontFamily = "Segoe UI"
                FontSize = "15"
                Height = "40"
                Width = "170"
                />
            </StackPanel>
        </StackPanel>
 
        <!-- Dism Command -->
        <StackPanel Grid.Column = "2" Grid.ColumnSpan = "1" Grid.Row = "5" VerticalAlignment = "Bottom">
            <!-- DismCommandStack -->
            <StackPanel x:Name = "DismCommandStack" Orientation = "Horizontal" HorizontalAlignment = "Right" VerticalAlignment = "Bottom" Margin = "7">
 
                <Label Name = "DismCommandLabel"
                Content = "Command Line:"
                FontFamily = "Segoe UI"
                FontSize = "15"
                Foreground = "White"
                VerticalAlignment = "Center"
                />
                <TextBox Name = "DismCommandTextbox"
                Background = "#002846"
                BorderThickness = "2"
                FontFamily = "Segoe UI"
                FontSize = "15"
                FontWeight = "Normal"
                Foreground = "White"
                Height = "110"
                IsReadOnly = "True"
                Padding = "8"
                TextWrapping = "Wrap"
                Width = "575"
                VerticalAlignment = "Center"
                />
            </StackPanel>
        </StackPanel>
    </Grid>
</Controls:MetroWindow>