WPFWindows/ReplotConfigWindow.xaml

<Window
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:PSChiaPlotter"
        Title="Replot Configuration Window" Height="450" Width="625">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="5" />
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="5" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="5" />
            <RowDefinition Height="*" />
            <RowDefinition Height="auto" />
            <RowDefinition Height="auto" />
            <RowDefinition Height="5" />
        </Grid.RowDefinitions>
 
        <ScrollViewer x:Name="Replot_ScrollViewer"
            Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="3"
            VerticalScrollBarVisibility="Auto">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="5" />
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="5" />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="5" />
                    <RowDefinition Height="*" />
                    <RowDefinition Height="auto" />
                    <RowDefinition Height="*" />
                    <RowDefinition Height="5" />
                </Grid.RowDefinitions>
 
                <DataGrid x:Name="FinalVolume_DataGrid" IsReadOnly="True"
                  RowBackground="LightSlateGray" AlternatingRowBackground="CadetBlue"
                  CanUserAddRows="False" CanUserDeleteRows="False"
                  SelectionMode="Single" AutoGenerateColumns="False"
                  Grid.Row="1" Grid.Column="1">
                    <DataGrid.Columns>
                        <DataGridCheckBoxColumn Header="Replot Enabled" Binding="{Binding ReplotEnabled}" />
                        <DataGridTextColumn Header="Letter" Binding="{Binding DriveLetter}" />
                        <DataGridTextColumn Header="Label" Binding="{Binding Label}" />
                        <DataGridTextColumn Header="Directory Path" Binding="{Binding DirectoryPath}" />
                        <DataGridTextColumn Header="Size (GB)" Binding="{Binding SizeInGB}" />
                        <DataGridTextColumn Header="Free Space (GB)" Binding="{Binding FreeSpaceInGB}" />
                        <DataGridTextColumn Header="% Free" Binding="{Binding PercentFree}" />
                        <DataGridTextColumn Header="Replot Count" Binding="{Binding TotalReplotCount}" />
                        <DataGridTextColumn Header="BusType" Binding="{Binding BusType}" />
                        <DataGridTextColumn Header="MediaType" Binding="{Binding MediaType}" />
                    </DataGrid.Columns>
                </DataGrid>
                <Separator Grid.Column="1" Grid.Row="2" Margin="5" />
 
                <Grid x:Name="AddOldPlot_Grid"
                      Grid.Row="3" Grid.Column="1"
                      IsEnabled="False">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="0" />
                        <ColumnDefinition Width="auto" />
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="auto" />
                        <ColumnDefinition Width="0" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="0" />
                        <RowDefinition Height="auto" />
                        <RowDefinition Height="auto" />
                        <RowDefinition Height="*" />
                        <RowDefinition Height="0" />
                    </Grid.RowDefinitions>
 
                    <Label Content="New Plots Final Directory:" Grid.Row="1" Grid.Column="1" HorizontalAlignment="Right"/>
                    <Label Content="Old Plots Directories:" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Right"/>
 
                    <StackPanel Orientation="Horizontal" Margin="5,0,5,0" VerticalAlignment="Bottom"
                                Grid.Column="1" Grid.Row="3" >
                        <Label Content="Total Replot Count:" FontWeight="Bold" HorizontalAlignment="Left"/>
                        <TextBox Text="{Binding TotalReplotCount}" Foreground="OrangeRed"
                                 HorizontalContentAlignment="Center" IsReadOnly="True"
                                 Margin="0,0,0,5" MinWidth="25"/>
                    </StackPanel>
 
                    <TextBox x:Name="NewPlotsFinalDirectory_Textbox"
                     Margin="5" Grid.ColumnSpan="2"
                     Grid.Row="1" Grid.Column="2"
                     Text="{Binding Path=DirectoryPath}" />
                    <TextBox x:Name="OldPlotDirectory_Textbox"
                     Margin="5" Grid.Row="2" Grid.Column="2"/>
                    <Button x:Name="AddOldPlotDirectory_Button" Content="Add"
                    Grid.Column="3" Grid.Row="2" Margin="5" Padding="5,0,5,0"/>
                    <ListBox x:Name="OldDirectories_ListBox"
                     Grid.Row="3" Grid.Column="2" Grid.ColumnSpan="2" MinHeight="75"
                     Margin="5" ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                     HorizontalContentAlignment="Stretch"
                     ItemsSource="{Binding Path=OldPlotDirectories}">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <Border BorderBrush="SlateGray" BorderThickness="1">
                                    <Grid>
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="auto" />
                                            <ColumnDefinition Width="*" />
                                            <ColumnDefinition Width="auto" />
                                            <ColumnDefinition Width="auto" />
                                            <ColumnDefinition Width="auto" />
                                            <ColumnDefinition Width="auto" />
                                        </Grid.ColumnDefinitions>
                                        <Label Content="Path:" Grid.Column="0" FontWeight="Bold" VerticalAlignment="Center"/>
                                        <TextBox Text="{Binding Path}" Grid.Column="1" IsReadOnly="True" Margin="5" HorizontalAlignment="Stretch"/>
                                        <Separator Grid.Column="2" Style="{StaticResource {x:Static ToolBar.SeparatorStyleKey}}" Margin="5"/>
                                        <Label Content="Old Plot Count:" Grid.Column="3" FontWeight="Bold" VerticalAlignment="Center"/>
                                        <Label Content="{Binding PlotCount}" Grid.Column="4" VerticalAlignment="Center" Foreground="OrangeRed" FontWeight="Black"/>
                                        <Button Content="Remove"
                                                BorderBrush="Pink" Background="Transparent" Foreground="Red"
                                                Grid.Column="5" Margin="5"
                                                CommandParameter="{Binding}" Command="{Binding RelativeSource={RelativeSource AncestorType={x:Type ListBox}}, Path=DataContext.RemoveOldPlotPathCommand}"/>
                                    </Grid>
                                </Border>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>
                </Grid>
            </Grid>
        </ScrollViewer>
        <Separator Grid.Column="1" Grid.Row="2" Grid.ColumnSpan="3" Margin="5" />
        <Button x:Name="ConfirmReplot_Button" Content="Confirm Changes"
                Grid.Row="3" Grid.Column="3"
                 Margin="5"/>
        <Button x:Name="CancelReplot_Button" Content="Cancel"
                Grid.Row="3" Grid.Column="2"
                 Margin="5"/>
        <Button x:Name="HelpReplot_Button" Content="Help"
                Grid.Row="3" Grid.Column="1"
                Margin="5"/>
    </Grid>
</Window>