<UserControl x:Class="Vulnerator.View.UI.VulnerabilityManagementView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
             xmlns:Converters="clr-namespace:Vulnerator.View.Converter"
             xmlns:IconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
             xmlns:LiveCharts="clr-namespace:LiveCharts.Wpf;assembly=LiveCharts.Wpf"
             xmlns:ViewHelper="clr-namespace:Vulnerator.View.ViewHelper"
             xmlns:ViewModel="clr-namespace:Vulnerator.ViewModel"
             xmlns:WPFToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Layout.Toolkit"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:dat="clr-namespace:System.Windows.Data;assembly=PresentationFramework"
             xmlns:diag="clr-namespace:System.Diagnostics;assembly=WindowsBase"
             xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
             xmlns:local="clr-namespace:Vulnerator.View.UI"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:scm="clr-namespace:System.ComponentModel;assembly=WindowsBase"
             xmlns:vh="clr-namespace:Vulnerator.View.ViewHelper"
             HorizontalAlignment="Stretch"
             VerticalAlignment="Stretch"
             DataContext="{Binding Vulnerability, Source={StaticResource Locator}}"
             mc:Ignorable="d">

    <UserControl.Resources>
        <Converters:BooleanToIconConverter x:Key="IconConverter" />
        <Converters:FileTypeToVisibilityConverter x:Key="FileTypeToVisibilityConverter" />
        <Converters:BooleanToCheckboxConverter x:Key="CheckboxConverter" />
        <Converters:IsNullToVisibleConverter x:Key="IsNullToVisibleConverter" />
        <Converters:IsNullToCollapsedConverter x:Key="IsNullToCollapsedConverter" />
        <Style TargetType="{x:Type LiveCharts:ColumnSeries}">
            <Setter Property="Stroke" Value="{DynamicResource AccentColorBrush}" />
        </Style>
        <Style TargetType="{x:Type LiveCharts:Separator}">
            <Setter Property="Stroke" Value="{DynamicResource GrayBrush8}" />
        </Style>
        <Style TargetType="{x:Type LiveCharts:DefaultLegend}">
            <Setter Property="BulletSize" Value="8" />
        </Style>
        <Style TargetType="{x:Type LiveCharts:DefaultTooltip}">
            <Setter Property="Background" Value="{DynamicResource WindowBackgroundBrush}" />
            <Setter Property="Foreground" Value="{DynamicResource TextBrush}" />
            <Setter Property="Opacity" Value="0.85" />
            <Setter Property="SelectionMode" Value="OnlySender" />
        </Style>
        <LiveCharts:ColorsCollection x:Key="ColorsCollection">
            <Color B="0" G="0" R="211" ScA="0.75" />
            <Color B="0" G="112" R="224" ScA="0.75" />
            <Color B="0" G="226" R="242" ScA="0.75" />
            <Color B="0" G="178" R="8" ScA="0.75" />
        </LiveCharts:ColorsCollection>
    </UserControl.Resources>
    <Grid Background="{DynamicResource WindowBackgroundBrush}">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="184*" />
            <ColumnDefinition Width="199*" />
        </Grid.ColumnDefinitions>
        <Controls:MetroAnimatedSingleRowTabControl Grid.ColumnSpan="2"
                                                   Controls:TabControlHelper.Underlined="SelectedTabItem">
            <!--<TabItem Header="Dashboard" Style="{StaticResource CustomMetroTabItem}">
                <ScrollViewer VerticalContentAlignment="Top" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
                    <StackPanel>
                        <Grid Height="200">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition />
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                                <RowDefinition />
                            </Grid.RowDefinitions>
                            <Label Grid.Row="0" Content="Vulnerability Counts" Style="{StaticResource TopLevelHeaderStyle}" />
                            <Label Grid.Row="0" Grid.Column="1" Margin="5,0,0,0" Content="Vulnerability Trending" Style="{StaticResource TopLevelHeaderStyle}" />
                            <LiveCharts:CartesianChart Grid.Row="1" LegendLocation="Right" Series="{Binding ColumnSeriesCollection}" SeriesColors="{StaticResource ColorsCollection}">
                                <LiveCharts:CartesianChart.AxisX>
                                    <LiveCharts:AxesCollection />
                                </LiveCharts:CartesianChart.AxisX>
                                <LiveCharts:CartesianChart.AxisY>
                                    <LiveCharts:AxesCollection />
                                </LiveCharts:CartesianChart.AxisY>
                            </LiveCharts:CartesianChart>
                            <LiveCharts:CartesianChart Grid.Row="1" Grid.Column="1" Margin="5,0,0,0" LegendLocation="Right" Series="{Binding AreaSerisCollection}" SeriesColors="{StaticResource ColorsCollection}">
                                <LiveCharts:CartesianChart.AxisX>
                                    <LiveCharts:AxesCollection />
                                </LiveCharts:CartesianChart.AxisX>
                                <LiveCharts:CartesianChart.AxisY>
                                    <LiveCharts:AxesCollection />
                                </LiveCharts:CartesianChart.AxisY>
                            </LiveCharts:CartesianChart>
                        </Grid>
                    </StackPanel>
                </ScrollViewer>
            </TabItem>-->
            <TabItem Header="Ingest"
                     Selector.IsSelected="True"
                     Style="{StaticResource CustomMetroTabItem}">
                <Grid Margin="{StaticResource MarginLeftRightBottom5}">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>
                    <StackPanel Grid.Column="0"
                                Width="180"
                                Height="Auto"
                                Margin="0,0,5,0"
                                VerticalAlignment="Top">
                        <Controls:SplitButton Command="{Binding IngestFilesCommand}"
                                              CommandParameter="{Binding SelectedValue, RelativeSource={RelativeSource Self}}"
                                              ItemsSource="{Binding SupportedFileTypes}"
                                              SelectedIndex="0"
                                              Style="{StaticResource SplitButtonStyle}" />
                        <ComboBox Controls:TextBoxHelper.Watermark="Ingestion Group (Optional)"
                                  vh:DependencyProperties.FloatingWatermark="Ingestion Group"
                                  DisplayMemberPath="GroupName"
                                  ItemsSource="{Binding Groups}"
                                  SelectedItem="{Binding IngestionGroup}"
                                  Style="{StaticResource HeaderedComboBoxStyle}" />
                        <Button Margin="{StaticResource MarginTop5}"
                                Command="{Binding ExecuteIngestionCommand}"
                                Content="Execute Ingestion" />
                        <Button Margin="{StaticResource MarginTop5}"
                                Command="{Binding ClearIngestedFilesCommand}"
                                Content="Clear List" />
                        <Grid Margin="{StaticResource MarginTop5}">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="*" />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <Label Grid.Column="0"
                                   VerticalAlignment="Center"
                                   Content="File Count: " />
                            <Label Grid.Column="2"
                                   VerticalAlignment="Center"
                                   Content="{Binding IngestedFiles.Count}" />
                        </Grid>
                    </StackPanel>
                    <DataGrid x:Name="ingestFilesDataGrid"
                              Grid.Column="1"
                              HorizontalAlignment="Stretch"
                              VerticalAlignment="Stretch"
                              CanUserReorderColumns="True"
                              ItemsSource="{Binding IngestedFiles, Mode=TwoWay}"
                              RowDetailsVisibilityMode="{Binding SelectedItem.FileType, Converter={StaticResource FileTypeToVisibilityConverter}, RelativeSource={RelativeSource Self}}"
                              Style="{StaticResource GreyBorderedDataGridStyle}"
                              VerticalScrollBarVisibility="Auto">
                        <DataGrid.Columns>
                            <DataGridTemplateColumn Width="*"
                                                    HeaderStyle="{StaticResource CustomCenterAlignedDataGridHeaderStyle}"
                                                    SortMemberPath="FileName">
                                <DataGridTemplateColumn.Header>
                                    <TextBlock HorizontalAlignment="Center"
                                               Text="File Name"
                                               TextTrimming="CharacterEllipsis" />
                                </DataGridTemplateColumn.Header>
                                <DataGridTemplateColumn.CellTemplate>
                                    <DataTemplate>
                                        <TextBlock Text="{Binding FileName}"
                                                   TextTrimming="CharacterEllipsis"
                                                   TextWrapping="NoWrap"
                                                   ToolTip="{Binding FileName}" />
                                    </DataTemplate>
                                </DataGridTemplateColumn.CellTemplate>
                            </DataGridTemplateColumn>
                            <DataGridTemplateColumn Width=".5*"
                                                    HeaderStyle="{StaticResource CustomCenterAlignedDataGridHeaderStyle}"
                                                    SortMemberPath="FileType">
                                <DataGridTemplateColumn.Header>
                                    <TextBlock HorizontalAlignment="Center"
                                               Text="File Type"
                                               TextTrimming="CharacterEllipsis" />
                                </DataGridTemplateColumn.Header>
                                <DataGridTemplateColumn.CellTemplate>
                                    <DataTemplate>
                                        <TextBlock HorizontalAlignment="Center"
                                                   Text="{Binding FileType}"
                                                   TextTrimming="CharacterEllipsis"
                                                   TextWrapping="NoWrap"
                                                   ToolTip="{Binding FileType}" />
                                    </DataTemplate>
                                </DataGridTemplateColumn.CellTemplate>
                            </DataGridTemplateColumn>
                            <DataGridTemplateColumn Width=".5*"
                                                    HeaderStyle="{StaticResource CustomCenterAlignedDataGridHeaderStyle}"
                                                    SortMemberPath="Status">
                                <DataGridTemplateColumn.Header>
                                    <TextBlock HorizontalAlignment="Center"
                                               Text="Status"
                                               TextTrimming="CharacterEllipsis" />
                                </DataGridTemplateColumn.Header>
                                <DataGridTemplateColumn.CellTemplate>
                                    <DataTemplate>
                                        <TextBlock HorizontalAlignment="Center"
                                                   Text="{Binding Status}"
                                                   TextTrimming="CharacterEllipsis"
                                                   TextWrapping="NoWrap"
                                                   ToolTip="{Binding Status}" />
                                    </DataTemplate>
                                </DataGridTemplateColumn.CellTemplate>
                            </DataGridTemplateColumn>
                            <DataGridTemplateColumn Width="Auto"
                                                    HeaderStyle="{StaticResource CustomCenterAlignedDataGridHeaderStyle}"
                                                    SortMemberPath="IdentifiersProvided">
                                <DataGridTemplateColumn.Header>
                                    <TextBlock HorizontalAlignment="Center"
                                               Text="Hostname / IP"
                                               TextTrimming="CharacterEllipsis" />
                                </DataGridTemplateColumn.Header>
                                <DataGridTemplateColumn.CellTemplate>
                                    <DataTemplate>
                                        <IconPacks:PackIconFontAwesomeLight HorizontalAlignment="Center"
                                                                            Kind="{Binding IdentifiersProvided, Converter={StaticResource IconConverter}}"
                                                                            ToolTip="{Binding IdentifiersProvided}" />
                                    </DataTemplate>
                                </DataGridTemplateColumn.CellTemplate>
                            </DataGridTemplateColumn>
                        </DataGrid.Columns>
                        <DataGrid.RowDetailsTemplate>
                            <DataTemplate>
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition />
                                        <ColumnDefinition />
                                        <ColumnDefinition />
                                    </Grid.ColumnDefinitions>
                                    <IconPacks:PackIconMaterial Margin="5,5,0,5"
                                                                Kind="SubdirectoryArrowRight" />
                                    <TextBox Grid.Column="1"
                                             Margin="{StaticResource MarginLeftRightBottom5}"
                                             VerticalAlignment="Bottom"
                                             Controls:TextBoxHelper.UseFloatingWatermark="True"
                                             Controls:TextBoxHelper.Watermark="Host Name"
                                             Text="{Binding FileHostName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                                    <TextBox Grid.Column="2"
                                             Margin="{StaticResource MarginLeftRightBottom5}"
                                             VerticalAlignment="Bottom"
                                             Controls:TextBoxHelper.UseFloatingWatermark="True"
                                             Controls:TextBoxHelper.Watermark="IP Address(es)"
                                             Text="{Binding FileIpAddress, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                                    <TextBox Grid.Column="3"
                                             Margin="{StaticResource MarginLeftRightBottom5}"
                                             VerticalAlignment="Bottom"
                                             Controls:TextBoxHelper.UseFloatingWatermark="True"
                                             Controls:TextBoxHelper.Watermark="MAC"
                                             Text="{Binding FileMacAddress, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                                </Grid>
                            </DataTemplate>
                        </DataGrid.RowDetailsTemplate>
                    </DataGrid>
                    <Expander Grid.Column="2"
                              Height="Auto"
                              Background="{DynamicResource WindowBackgroundBrush}"
                              BorderThickness="0"
                              ExpandDirection="Right"
                              IsExpanded="False"
                              Style="{StaticResource CustomExpander}">
                        <Expander.Header>
                            <Label Foreground="{DynamicResource LabelTextBrush}">
                                <Label.LayoutTransform>
                                    <RotateTransform Angle="90" />
                                </Label.LayoutTransform>
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition Width="Auto" />
                                    </Grid.ColumnDefinitions>
                                    <IconPacks:PackIconFontAwesomeLight Grid.Column="0"
                                                                        Margin="5"
                                                                        HorizontalAlignment="Center"
                                                                        VerticalAlignment="Center"
                                                                        Kind="SlidersV" />
                                    <TextBlock Grid.Column="1"
                                               Margin="5,0"
                                               HorizontalAlignment="Center"
                                               VerticalAlignment="Center"
                                               Foreground="{DynamicResource LabelTextBrush}"
                                               Text="Configure Ingestion"
                                               TextTrimming="CharacterEllipsis" />
                                </Grid>
                            </Label>
                        </Expander.Header>
                        <ScrollViewer VerticalScrollBarVisibility="Auto">
                            <StackPanel>
                                <Label Style="{StaticResource SecondLevelHeaderStyle}">
                                    <TextBlock Text="CKL Files"
                                               TextTrimming="CharacterEllipsis"
                                               TextWrapping="NoWrap" />
                                </Label>
                                <CheckBox Margin="{StaticResource MarginLeftRightBottom5}"
                                          Content="Require CKL Host Name to be populated"
                                          IsChecked="{Binding Default.CklRequiresHostName, Mode=TwoWay, Source={StaticResource Settings}}"
                                          Style="{StaticResource CustomCheckBox}" />
                                <CheckBox Margin="{StaticResource MarginLeftRightBottom5}"
                                          Content="Require CKL IP Address to be populated"
                                          IsChecked="{Binding Default.CklRequiresIpAddress, Mode=TwoWay, Source={StaticResource Settings}}"
                                          Style="{StaticResource CustomCheckBox}" />
                                <CheckBox Margin="{StaticResource MarginLeftRightBottom5}"
                                          Content="Require CKL MAC Address to be populated"
                                          IsChecked="{Binding Default.CklrequiresMacAddress, Mode=TwoWay, Source={StaticResource Settings}}"
                                          Style="{StaticResource CustomCheckBox}" />
                                <CheckBox Margin="{StaticResource MarginLeftRightBottom5}"
                                          Content="Ignore CKL files without required host identifiers"
                                          IsChecked="{Binding Default.DropIncompleteCklfiles, Mode=TwoWay, Source={StaticResource Settings}}"
                                          Style="{StaticResource CustomCheckBox}" />
                                <Label Style="{StaticResource SecondLevelHeaderStyle}">
                                    <TextBlock Grid.Column="1"
                                               Text="ACAS Files"
                                               TextTrimming="CharacterEllipsis"
                                               TextWrapping="NoWrap" />
                                </Label>
                                <CheckBox Margin="{StaticResource MarginLeftRightBottom5}"
                                          Content="Parse ACAS vulnerability port information"
                                          IsChecked="{Binding Default.CaptureAcasPortInformation, Mode=TwoWay, Source={StaticResource Settings}}"
                                          Style="{StaticResource CustomCheckBox}" />
                                <CheckBox Margin="{StaticResource MarginLeftRightBottom5}"
                                          Content="Parse ACAS vulnerability reference information"
                                          IsChecked="{Binding Default.CaptureAcasReferenceInformation, Mode=TwoWay, Source={StaticResource Settings}}"
                                          Style="{StaticResource CustomCheckBox}" />
                                <CheckBox Margin="{StaticResource MarginLeftRightBottom5}"
                                          Content="Parse ACAS enumerated software (Plugins 20811, 22869, 29217)"
                                          IsChecked="{Binding Default.CaptureAcasEnumeratedSoftware, Mode=TwoWay, Source={StaticResource Settings}}"
                                          Style="{StaticResource CustomCheckBox}" />
                            </StackPanel>
                        </ScrollViewer>
                    </Expander>
                </Grid>
            </TabItem>
            <TabItem Header="Findings"
                     Style="{StaticResource CustomMetroTabItem}">
                <Grid Margin="{StaticResource MarginLeftRightBottom5}">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition />
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>
                    <Grid Grid.Column="0">
                        <Grid.RowDefinitions>
                            <RowDefinition />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>
                        <DockPanel Margin="{StaticResource MarginBottom5}">
                            <StackPanel HorizontalAlignment="Right"
                                        DockPanel.Dock="Top"
                                        Orientation="Horizontal">
                                <Label HorizontalAlignment="Right"
                                       VerticalAlignment="Bottom">
                                    <TextBlock Text="Finding Count:"
                                               TextTrimming="CharacterEllipsis"
                                               TextWrapping="NoWrap" />
                                </Label>
                                <Label HorizontalAlignment="Right"
                                       VerticalAlignment="Bottom">
                                    <TextBlock Text="{Binding UniqueFindings.Count}"
                                               TextTrimming="CharacterEllipsis"
                                               TextWrapping="NoWrap" />
                                </Label>
                            </StackPanel>
                            <DataGrid HorizontalAlignment="Stretch"
                                      VerticalAlignment="Stretch"
                                      DockPanel.Dock="Top"
                                      ItemsSource="{Binding UniqueFindings}"
                                      SelectedItem="{Binding SelectedUniqueFinding}"
                                      Style="{StaticResource GreyBorderedDataGridStyle}">
                                <DataGrid.Columns>
                                    <DataGridTemplateColumn Width="Auto">
                                        <DataGridTemplateColumn.CellTemplate>
                                            <DataTemplate>
                                                <CheckBox Margin="5,0,0,0"
                                                          HorizontalAlignment="Center"
                                                          IsChecked="{Binding IsChecked}"
                                                          Style="{StaticResource CustomCheckBox}" />
                                            </DataTemplate>
                                        </DataGridTemplateColumn.CellTemplate>
                                    </DataGridTemplateColumn>
                                    <DataGridTemplateColumn Width="*"
                                                            HeaderStyle="{StaticResource CustomLeftAlignedDataGridHeaderStyle}">
                                        <DataGridTemplateColumn.Header>
                                            <TextBlock Text="Vulnerability ID"
                                                       TextTrimming="CharacterEllipsis" />
                                        </DataGridTemplateColumn.Header>
                                        <DataGridTemplateColumn.CellTemplate>
                                            <DataTemplate>
                                                <TextBlock Text="{Binding Vulnerability.UniqueVulnerabilityIdentifier}"
                                                           TextTrimming="CharacterEllipsis"
                                                           TextWrapping="NoWrap"
                                                           ToolTip="{Binding Vulnerability.UniqueVulnerabilityIdentifier}" />
                                            </DataTemplate>
                                        </DataGridTemplateColumn.CellTemplate>
                                    </DataGridTemplateColumn>
                                    <DataGridTemplateColumn Width="Auto"
                                                            HeaderStyle="{StaticResource CustomCenterAlignedDataGridHeaderStyle}">
                                        <DataGridTemplateColumn.Header>
                                            <TextBlock Text="Raw Risk"
                                                       TextTrimming="CharacterEllipsis" />
                                        </DataGridTemplateColumn.Header>
                                        <DataGridTemplateColumn.CellTemplate>
                                            <DataTemplate>
                                                <TextBlock Text="{Binding Vulnerability.PrimaryRawRiskIndicator}"
                                                           TextTrimming="CharacterEllipsis"
                                                           TextWrapping="NoWrap"
                                                           ToolTip="{Binding Vulnerability.PrimaryRawRiskIndicator}" />
                                            </DataTemplate>
                                        </DataGridTemplateColumn.CellTemplate>
                                    </DataGridTemplateColumn>
                                    <DataGridTemplateColumn Width="*"
                                                            HeaderStyle="{StaticResource CustomCenterAlignedDataGridHeaderStyle}">
                                        <DataGridTemplateColumn.Header>
                                            <TextBlock Text="Host Name"
                                                       TextTrimming="CharacterEllipsis" />
                                        </DataGridTemplateColumn.Header>
                                        <DataGridTemplateColumn.CellTemplate>
                                            <DataTemplate>
                                                <TextBlock Text="{Binding Hardware.DisplayedHostName}"
                                                           TextTrimming="CharacterEllipsis"
                                                           TextWrapping="NoWrap"
                                                           ToolTip="{Binding Hardware.DisplayedHostName}" />
                                            </DataTemplate>
                                        </DataGridTemplateColumn.CellTemplate>
                                    </DataGridTemplateColumn>
                                    <DataGridTemplateColumn Width="*"
                                                            HeaderStyle="{StaticResource CustomCenterAlignedDataGridHeaderStyle}">
                                        <DataGridTemplateColumn.Header>
                                            <TextBlock Text="IP Address"
                                                       TextTrimming="CharacterEllipsis" />
                                        </DataGridTemplateColumn.Header>
                                        <DataGridTemplateColumn.CellTemplate>
                                            <DataTemplate>
                                                <TextBlock Text="{Binding Hardware.ScanIP}"
                                                           TextTrimming="CharacterEllipsis"
                                                           TextWrapping="NoWrap"
                                                           ToolTip="{Binding Hardware.ScanIP}" />
                                            </DataTemplate>
                                        </DataGridTemplateColumn.CellTemplate>
                                    </DataGridTemplateColumn>
                                    <DataGridTemplateColumn Width="*"
                                                            HeaderStyle="{StaticResource CustomCenterAlignedDataGridHeaderStyle}">
                                        <DataGridTemplateColumn.Header>
                                            <TextBlock Text="Last Observed"
                                                       TextTrimming="CharacterEllipsis" />
                                        </DataGridTemplateColumn.Header>
                                        <DataGridTemplateColumn.CellTemplate>
                                            <DataTemplate>
                                                <TextBlock Text="{Binding LastObserved}"
                                                           TextTrimming="CharacterEllipsis"
                                                           TextWrapping="NoWrap"
                                                           ToolTip="{Binding LastObserved}" />
                                            </DataTemplate>
                                        </DataGridTemplateColumn.CellTemplate>
                                    </DataGridTemplateColumn>
                                    <DataGridTemplateColumn Width="*"
                                                            HeaderStyle="{StaticResource CustomCenterAlignedDataGridHeaderStyle}">
                                        <DataGridTemplateColumn.Header>
                                            <TextBlock Text="Status"
                                                       TextTrimming="CharacterEllipsis" />
                                        </DataGridTemplateColumn.Header>
                                        <DataGridTemplateColumn.CellTemplate>
                                            <DataTemplate>
                                                <TextBlock Text="{Binding Status}"
                                                           TextTrimming="CharacterEllipsis"
                                                           TextWrapping="NoWrap"
                                                           ToolTip="{Binding Status}" />
                                            </DataTemplate>
                                        </DataGridTemplateColumn.CellTemplate>
                                    </DataGridTemplateColumn>
                                    <DataGridTemplateColumn Width="Auto"
                                                            HeaderStyle="{StaticResource CustomCenterAlignedDataGridHeaderStyle}">
                                        <DataGridTemplateColumn.Header>
                                            <TextBlock Text="Mitigated"
                                                       TextTrimming="CharacterEllipsis" />
                                        </DataGridTemplateColumn.Header>
                                    </DataGridTemplateColumn>
                                </DataGrid.Columns>
                            </DataGrid>
                        </DockPanel>
                        <ScrollViewer Grid.Row="1"
                                      HorizontalScrollBarVisibility="Auto"
                                      VerticalScrollBarVisibility="Disabled">
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition />
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="Auto" />
                                </Grid.ColumnDefinitions>
                                <Button Grid.Column="1"
                                        Command="{Binding ClearSelectedUniqueFindingCommand}"
                                        Content="Clear Selected Finding" />
                                <Button Grid.Column="2"
                                        Margin="{StaticResource MarginLeft5}"
                                        Command="{Binding DeleteUniqueFindingCommand}"
                                        Content="Delete Selected Finding" />
                            </Grid>
                        </ScrollViewer>
                    </Grid>
                    <Expander Grid.Column="1"
                              Background="{DynamicResource WindowBackgroundBrush}"
                              BorderThickness="0"
                              ExpandDirection="Right"
                              Style="{StaticResource CustomExpander}">
                        <Expander.Header>
                            <Label Foreground="{DynamicResource LabelTextBrush}">
                                <Label.LayoutTransform>
                                    <RotateTransform Angle="90" />
                                </Label.LayoutTransform>
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition Width="Auto" />
                                    </Grid.ColumnDefinitions>
                                    <IconPacks:PackIconFontAwesomeLight Grid.Column="0"
                                                                        Margin="5"
                                                                        HorizontalAlignment="Center"
                                                                        VerticalAlignment="Center"
                                                                        Kind="PencilAlt">
                                        <IconPacks:PackIconFontAwesomeLight.LayoutTransform>
                                            <RotateTransform Angle="-90" />
                                        </IconPacks:PackIconFontAwesomeLight.LayoutTransform>
                                    </IconPacks:PackIconFontAwesomeLight>
                                    <TextBlock Grid.Column="1"
                                               Margin="5,0"
                                               HorizontalAlignment="Center"
                                               VerticalAlignment="Center"
                                               Foreground="{DynamicResource LabelTextBrush}"
                                               Text="Update Finding"
                                               TextTrimming="CharacterEllipsis" />
                                </Grid>
                            </Label>
                        </Expander.Header>
                        <ScrollViewer Width="400"
                                      HorizontalScrollBarVisibility="Disabled"
                                      VerticalScrollBarVisibility="Auto">
                            <StackPanel>
                                <TextBox Margin="0,0,0,5"
                                         Controls:TextBoxHelper.Watermark="Vulnerability Unique Identifier (Read Only)"
                                         IsReadOnly="True"
                                         Style="{StaticResource HeaderedTextBoxStyle}"
                                         Text="{Binding EditableUniqueFinding.Vulnerability.UniqueVulnerabilityIdentifier, Mode=OneWay}" />
                                <TextBox Margin="0,0,0,5"
                                         Controls:TextBoxHelper.Watermark="Vulnerability Group Identifier (Read Only)"
                                         IsReadOnly="True"
                                         Style="{StaticResource HeaderedTextBoxStyle}"
                                         Text="{Binding EditableUniqueFinding.Vulnerability.VulnerabilityGroup_ID, Mode=OneWay}" />
                                <TextBox Margin="0,0,0,5"
                                         Controls:TextBoxHelper.Watermark="Vulnerability Alternate Identifier (Read Only)"
                                         IsReadOnly="True"
                                         Style="{StaticResource HeaderedTextBoxStyle}"
                                         Text="{Binding EditableUniqueFinding.Vulnerability.SecondaryVulnerabilityIdentifier, Mode=OneWay}" />
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition />
                                        <ColumnDefinition />
                                    </Grid.ColumnDefinitions>
                                    <TextBox Margin="0,0,5,5"
                                             Controls:TextBoxHelper.Watermark="Host Name (Read Only)"
                                             IsReadOnly="True"
                                             Style="{StaticResource HeaderedTextBoxStyle}"
                                             Text="{Binding EditableUniqueFinding.Hardware.DisplayedHostName, Mode=OneWay}" />
                                    <TextBox Grid.Column="1"
                                             Margin="5,0,0,5"
                                             Controls:TextBoxHelper.Watermark="Scan IP Address (Read Only)"
                                             IsReadOnly="True"
                                             Style="{StaticResource HeaderedTextBoxStyle}"
                                             Text="{Binding EditableUniqueFinding.Hardware.ScanIP, Mode=OneWay}" />
                                </Grid>
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition />
                                        <ColumnDefinition />
                                    </Grid.ColumnDefinitions>
                                    <TextBox Margin="0,0,5,5"
                                             Controls:TextBoxHelper.Watermark="Software Name (Read Only)"
                                             IsReadOnly="True"
                                             Style="{StaticResource HeaderedTextBoxStyle}"
                                             Text="{Binding EditableUniqueFinding.Software.DisplayedSoftwareName, Mode=OneWay}" />
                                    <TextBox Grid.Column="1"
                                             Margin="5,0,0,5"
                                             Controls:TextBoxHelper.Watermark="Software Version (Read Only)"
                                             IsReadOnly="True"
                                             Style="{StaticResource HeaderedTextBoxStyle}"
                                             Text="{Binding EditableUniqueFinding.Software.SoftwareVersion, Mode=OneWay}" />
                                </Grid>
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition />
                                        <ColumnDefinition />
                                    </Grid.ColumnDefinitions>
                                    <TextBox Margin="0,0,5,5"
                                             Controls:TextBoxHelper.Watermark="First Discovered (Read only)"
                                             IsReadOnly="True"
                                             Style="{StaticResource HeaderedTextBoxStyle}"
                                             Text="{Binding EditableUniqueFinding.FirstDiscovered, Mode=OneWay}" />
                                    <TextBox Grid.Column="1"
                                             Margin="5,0,0,5"
                                             Controls:TextBoxHelper.Watermark="Last Observed (Read only)"
                                             IsReadOnly="True"
                                             Style="{StaticResource HeaderedTextBoxStyle}"
                                             Text="{Binding EditableUniqueFinding.LastObserved, Mode=OneWay}" />
                                </Grid>
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition />
                                        <ColumnDefinition />
                                    </Grid.ColumnDefinitions>
                                    <TextBox Margin="0,0,5,5"
                                             Controls:TextBoxHelper.Watermark="Finding Type (Read only)"
                                             IsReadOnly="True"
                                             Style="{StaticResource HeaderedTextBoxStyle}"
                                             Text="{Binding EditableUniqueFinding.FindingType.Finding_Type, Mode=OneWay}" />
                                    <TextBox Grid.Column="1"
                                             Margin="5,0,0,5"
                                             Controls:TextBoxHelper.Watermark="Raw Status (Read Only)"
                                             IsReadOnly="True"
                                             Style="{StaticResource HeaderedTextBoxStyle}"
                                             Text="{Binding EditableUniqueFinding.Status, Mode=OneWay}" />
                                </Grid>
                                <TextBox MaxHeight="200"
                                         Margin="0,0,0,5"
                                         Controls:TextBoxHelper.Watermark="Tool Generated Output (Read Only)"
                                         IsReadOnly="True"
                                         Style="{StaticResource HeaderedTextBoxStyle}"
                                         Text="{Binding EditableUniqueFinding.ToolGeneratedOutput, Mode=OneWay}"
                                         TextWrapping="Wrap"
                                         HorizontalScrollBarVisibility="Disabled"
                                         VerticalScrollBarVisibility="Auto" />
                                <TextBox MaxHeight="200"
                                         Margin="0,0,0,5"
                                         Controls:TextBoxHelper.Watermark="Ingested Comments (Read Only)"
                                         IsReadOnly="True"
                                         Style="{StaticResource HeaderedTextBoxStyle}"
                                         Text="{Binding EditableUniqueFinding.Comments, Mode=OneWay}"
                                         TextWrapping="Wrap"
                                         HorizontalScrollBarVisibility="Disabled"
                                         VerticalScrollBarVisibility="Auto" />
                                <TextBox MaxHeight="200"
                                         Margin="0,0,0,5"
                                         Controls:TextBoxHelper.Watermark="Ingested Finding Details (Read Only)"
                                         IsReadOnly="True"
                                         Style="{StaticResource HeaderedTextBoxStyle}"
                                         Text="{Binding EditableUniqueFinding.FindingDetails, Mode=OneWay}"
                                         TextWrapping="Wrap"
                                         HorizontalScrollBarVisibility="Disabled"
                                         VerticalScrollBarVisibility="Auto" />

                                <ComboBox Margin="0,0,0,5"
                                          Controls:TextBoxHelper.Watermark="Mitigated Status"
                                          ItemsSource="{Binding MitigationStatuses}"
                                          SelectedItem="{Binding EditableUniqueFinding.MitigationOrCondition.MitigatedStatus, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                          Style="{StaticResource HeaderedComboBoxStyle}" />
                                <TextBox Height="200"
                                         Margin="0,0,0,5"
                                         Controls:TextBoxHelper.Watermark="Impact Description&#x0a;(Max 2000 Characters)"
                                         vh:DependencyProperties.FloatingWatermark="Impact Description"
                                         vh:DependencyProperties.ShowCharacterCount="True"
                                         AcceptsReturn="True"
                                         AcceptsTab="True"
                                         MaxLength="2000"
                                         Style="{StaticResource HeaderedTextBoxStyle}"
                                         Text="{Binding EditableUniqueFinding.MitigationOrCondition.ImpactDescription, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                         TextWrapping="Wrap"
                                         HorizontalScrollBarVisibility="Disabled"
                                         VerticalScrollBarVisibility="Auto" />
                                <TextBox Height="200"
                                         Margin="0,0,0,5"
                                         Controls:TextBoxHelper.Watermark="Predisposing Condition(s)&#x0a;(Max 2000 Characters)"
                                         vh:DependencyProperties.FloatingWatermark="Predisposing Condition(s)"
                                         vh:DependencyProperties.ShowCharacterCount="True"
                                         AcceptsReturn="True"
                                         AcceptsTab="True"
                                         MaxLength="2000"
                                         Style="{StaticResource HeaderedTextBoxStyle}"
                                         Text="{Binding EditableUniqueFinding.MitigationOrCondition.PredisposingConditions, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                         TextWrapping="Wrap"
                                         HorizontalScrollBarVisibility="Disabled"
                                         VerticalScrollBarVisibility="Auto" />
                                <TextBox Height="200"
                                         Margin="0,0,0,5"
                                         Controls:TextBoxHelper.Watermark="Technical Mitigation(s)&#x0a;(Max 2000 Characters)"
                                         vh:DependencyProperties.FloatingWatermark="Technical Mitigation(s)"
                                         vh:DependencyProperties.ShowCharacterCount="True"
                                         AcceptsReturn="True"
                                         AcceptsTab="True"
                                         MaxLength="2000"
                                         Style="{StaticResource HeaderedTextBoxStyle}"
                                         Text="{Binding EditableUniqueFinding.MitigationOrCondition.TechnicalMitigation, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                         TextWrapping="Wrap"
                                         HorizontalScrollBarVisibility="Disabled"
                                         VerticalScrollBarVisibility="Auto" />
                                <DatePicker Margin="0,0,0,5"
                                            Controls:TextBoxHelper.Watermark="Estimated Completion Date"
                                            Style="{StaticResource HeaderedDatePickerStyle}"
                                            Text="{Binding EditableUniqueFinding.MitigationOrCondition.EstimatedCompletionDate, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                                <TextBox Height="200"
                                         Margin="0,0,0,5"
                                         Controls:TextBoxHelper.Watermark="Threat Description&#x0a;(Max 2000 Characters)"
                                         vh:DependencyProperties.FloatingWatermark="Threat Description"
                                         vh:DependencyProperties.ShowCharacterCount="True"
                                         AcceptsReturn="True"
                                         AcceptsTab="True"
                                         MaxLength="2000"
                                         Style="{StaticResource HeaderedTextBoxStyle}"
                                         Text="{Binding EditableUniqueFinding.MitigationOrCondition.ThreatDescription, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                         TextWrapping="Wrap"
                                         HorizontalScrollBarVisibility="Disabled"
                                         VerticalScrollBarVisibility="Auto" />
                                <vh:CommandEnabledComboBox x:Name="findingThreatComboBox"
                                                           Margin="0,0,0,5"
                                                           Controls:TextBoxHelper.Watermark="Threat Relevance"
                                                           Command="{Binding CalculateLikelihoodCommand}"
                                                           CommandParameter="{Binding ElementName=findingThreatComboBox, Path=Name}"
                                                           ItemsSource="{Binding RmfValues}"
                                                           Style="{StaticResource HeaderedComboBoxStyle}"
                                                           Text="{Binding EditableUniqueFinding.MitigationOrCondition.ThreatRelevance, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                                <vh:CommandEnabledComboBox x:Name="findingSeverityComboBox"
                                                           Margin="0,0,0,5"
                                                           Controls:TextBoxHelper.Watermark="Severity / Pervasiveness"
                                                           Command="{Binding CalculateLikelihoodCommand}"
                                                           CommandParameter="{Binding ElementName=findingSeverityComboBox, Path=Name}"
                                                           ItemsSource="{Binding RmfValues}"
                                                           Style="{StaticResource HeaderedComboBoxStyle}"
                                                           Text="{Binding EditableUniqueFinding.MitigationOrCondition.SeverityPervasiveness, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                                <TextBox Margin="0,0,0,5"
                                         Controls:TextBoxHelper.Watermark="Likelihood (Calculated)"
                                         IsReadOnly="True"
                                         Style="{StaticResource HeaderedTextBoxStyle}"
                                         Text="{Binding EditableUniqueFinding.MitigationOrCondition.Likelihood, Mode=OneWay}" />
                                <vh:CommandEnabledComboBox x:Name="findingImpactComboBox"
                                                           Margin="0,0,0,5"
                                                           Controls:TextBoxHelper.Watermark="Impact"
                                                           Command="{Binding CalculateRiskCommand}"
                                                           CommandParameter="{Binding ElementName=findingImpactComboBox, Path=Name}"
                                                           ItemsSource="{Binding RmfValues}"
                                                           Style="{StaticResource HeaderedComboBoxStyle}"
                                                           Text="{Binding EditableUniqueFinding.MitigationOrCondition.Impact, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                                <TextBox Margin="0,0,0,5"
                                         Controls:TextBoxHelper.Watermark="Risk (Calculated)"
                                         IsReadOnly="True"
                                         Style="{StaticResource HeaderedTextBoxStyle}"
                                         Text="{Binding EditableUniqueFinding.MitigationOrCondition.Risk, Mode=OneWay}" />
                                <ComboBox Margin="0,0,0,5"
                                          Controls:TextBoxHelper.Watermark="Residual Risk"
                                          ItemsSource="{Binding RmfValues}"
                                          Style="{StaticResource HeaderedComboBoxStyle}"
                                          Text="{Binding EditableUniqueFinding.MitigationOrCondition.ResidualRisk, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                                <TextBox Height="200"
                                         Margin="0,0,0,5"
                                         Controls:TextBoxHelper.Watermark="Proposed Mitigation(s)&#x0a;(Max 2000 Characters)"
                                         vh:DependencyProperties.FloatingWatermark="Proposed Mitigation(s)"
                                         vh:DependencyProperties.ShowCharacterCount="True"
                                         AcceptsReturn="True"
                                         AcceptsTab="True"
                                         MaxLength="2000"
                                         Style="{StaticResource HeaderedTextBoxStyle}"
                                         Text="{Binding EditableUniqueFinding.MitigationOrCondition.ProposedMitigation, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                         TextWrapping="Wrap"
                                         HorizontalScrollBarVisibility="Disabled"
                                         VerticalScrollBarVisibility="Auto" />
                                <ComboBox Margin="0,0,0,5"
                                          Controls:TextBoxHelper.Watermark="Residual Risk After Proposed Mitigation(s)"
                                          ItemsSource="{Binding RmfValues}"
                                          Style="{StaticResource HeaderedComboBoxStyle}"
                                          Text="{Binding EditableUniqueFinding.MitigationOrCondition.ResidualRiskAfterProposed, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                                <Button Margin="0,0,0,5"
                                        HorizontalAlignment="Center"
                                        Command="{Binding UpdateUniqueFindingCommand}"
                                        Content="Update Finding" />
                            </StackPanel>
                        </ScrollViewer>
                    </Expander>
                </Grid>
            </TabItem>
            <TabItem Header="Group Mitigations"
                     Style="{StaticResource CustomMetroTabItem}">
                <Grid Margin="{StaticResource MarginLeftRightBottom5}">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>
                    <Grid Grid.Column="0">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>
                        <DockPanel Grid.Row="0"
                                   Margin="{StaticResource MarginBottom5}">
                            <StackPanel HorizontalAlignment="Right"
                                        DockPanel.Dock="Top"
                                        Orientation="Horizontal">
                                <Label HorizontalAlignment="Right"
                                       VerticalAlignment="Bottom">
                                    <TextBlock Text="Mitigation Count:"
                                               TextTrimming="CharacterEllipsis"
                                               TextWrapping="NoWrap" />
                                </Label>
                                <Label HorizontalAlignment="Right"
                                       VerticalAlignment="Bottom">
                                    <TextBlock Text="{Binding ProjectMitigations.Count}"
                                               TextTrimming="CharacterEllipsis"
                                               TextWrapping="NoWrap" />
                                </Label>
                            </StackPanel>
                            <DataGrid CanUserDeleteRows="False"
                                      DockPanel.Dock="Top"
                                      ItemsSource="{Binding ProjectMitigations}"
                                      SelectedItem="{Binding SelectedMitigationsOrCondition}"
                                      Style="{StaticResource GreyBorderedDataGridStyle}">
                                <DataGrid.Columns>
                                    <DataGridTemplateColumn x:Name="projectCheckBoxColumn"
                                                            Width="Auto">
                                        <DataGridTemplateColumn.CellTemplate>
                                            <DataTemplate>
                                                <CheckBox Margin="5,0,0,0"
                                                          HorizontalAlignment="Center"
                                                          IsChecked="{Binding IsChecked}"
                                                          Style="{StaticResource CustomCheckBox}" />
                                            </DataTemplate>
                                        </DataGridTemplateColumn.CellTemplate>
                                    </DataGridTemplateColumn>
                                    <DataGridTextColumn Width="*"
                                                        Binding="{Binding Vulnerability.UniqueVulnerabilityIdentifier}"
                                                        Header="Vulnerability Unique ID"
                                                        HeaderStyle="{StaticResource CustomCenterAlignedDataGridHeaderStyle}" />
                                    <DataGridTextColumn Width="*"
                                                        Binding="{Binding Vulnerability.VulnerabilityGroupIdentifier}"
                                                        Header="Vulnerability Group ID"
                                                        HeaderStyle="{StaticResource CustomCenterAlignedDataGridHeaderStyle}" />
                                    <DataGridTextColumn Width="*"
                                                        Binding="{Binding Vulnerability.SecondaryVulnerabilityIdentifier}"
                                                        Header="Vulnerability Secondary ID"
                                                        HeaderStyle="{StaticResource CustomCenterAlignedDataGridHeaderStyle}" />
                                    <DataGridTextColumn Width="*"
                                                        Binding="{Binding Group.GroupName}"
                                                        Header="Associated Group"
                                                        HeaderStyle="{StaticResource CustomCenterAlignedDataGridHeaderStyle}" />
                                    <DataGridTextColumn Width="*"
                                                        Binding="{Binding Vulnerability.PrimaryRawRiskIndicator}"
                                                        Header="Raw Risk"
                                                        HeaderStyle="{StaticResource CustomCenterAlignedDataGridHeaderStyle}" />
                                    <DataGridTextColumn Width="*"
                                                        Binding="{Binding MitigationOrCondition.ResidualRisk}"
                                                        Header="Residual Risk"
                                                        HeaderStyle="{StaticResource CustomCenterAlignedDataGridHeaderStyle}" />
                                    <DataGridTextColumn Width="*"
                                                        Binding="{Binding MitigationOrCondition.MitigatedStatus}"
                                                        Header="Mitigated Status"
                                                        HeaderStyle="{StaticResource CustomCenterAlignedDataGridHeaderStyle}" />
                                    <DataGridTextColumn Width="Auto"
                                                        Binding="{Binding MitigationOrCondition.IsApproved}"
                                                        Header="Approved"
                                                        HeaderStyle="{StaticResource CustomCenterAlignedDataGridHeaderStyle}" />
                                </DataGrid.Columns>
                            </DataGrid>
                        </DockPanel>
                        <ScrollViewer Grid.Row="1"
                                      HorizontalScrollBarVisibility="Auto"
                                      VerticalScrollBarVisibility="Disabled">
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*" />
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="Auto" />
                                </Grid.ColumnDefinitions>
                                <Button Grid.Column="1"
                                        Command="{Binding ClearSelectedMitigationCommand}"
                                        Content="Clear Selected Mitigation" />
                                <Button Grid.Column="2"
                                        Margin="{StaticResource MarginLeft5}"
                                        Command="{Binding DeleteMitigationCommand}"
                                        Content="Delete Selected Mitigation" />
                            </Grid>
                        </ScrollViewer>
                    </Grid>
                    <Expander Grid.Column="1"
                              Background="{DynamicResource WindowBackgroundBrush}"
                              BorderThickness="0"
                              ExpandDirection="Right"
                              Style="{StaticResource CustomExpander}">
                        <Expander.Header>
                            <Label Foreground="{DynamicResource LabelTextBrush}">
                                <Label.LayoutTransform>
                                    <RotateTransform Angle="90" />
                                </Label.LayoutTransform>
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition Width="Auto" />
                                    </Grid.ColumnDefinitions>
                                    <IconPacks:PackIconFontAwesomeLight Grid.Column="0"
                                                                        Margin="5"
                                                                        HorizontalAlignment="Center"
                                                                        VerticalAlignment="Center"
                                                                        Kind="PencilAlt">
                                        <IconPacks:PackIconFontAwesomeLight.LayoutTransform>
                                            <RotateTransform Angle="-90" />
                                        </IconPacks:PackIconFontAwesomeLight.LayoutTransform>
                                    </IconPacks:PackIconFontAwesomeLight>
                                    <TextBlock Grid.Column="1"
                                               Margin="5,0"
                                               HorizontalAlignment="Center"
                                               VerticalAlignment="Center"
                                               Foreground="{DynamicResource LabelTextBrush}"
                                               Text="Add/Update Mitigation(s)"
                                               TextTrimming="CharacterEllipsis" />
                                </Grid>
                            </Label>
                        </Expander.Header>
                        <ScrollViewer Width="400"
                                      HorizontalScrollBarVisibility="Disabled"
                                      VerticalScrollBarVisibility="Auto">
                            <StackPanel>
                                <Grid>
                                    <DataGrid Height="200"
                                              Margin="0,5"
                                              HorizontalAlignment="Stretch"
                                              CanUserDeleteRows="False"
                                              ItemsSource="{Binding Vulnerabilities}"
                                              Style="{StaticResource GreyBorderedDataGridStyle}"
                                              Visibility="{Binding SelectedMitigationsOrCondition, Converter={StaticResource IsNullToVisibleConverter}}"
                                              VerticalScrollBarVisibility="Auto">
                                        <DataGrid.Columns>
                                            <DataGridTemplateColumn>
                                                <DataGridTemplateColumn.CellTemplate>
                                                    <DataTemplate>
                                                        <CheckBox Margin="5,0,0,0"
                                                                  IsChecked="{Binding IsChecked, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                                                  Style="{StaticResource CustomCheckBox}" />
                                                    </DataTemplate>
                                                </DataGridTemplateColumn.CellTemplate>
                                            </DataGridTemplateColumn>
                                            <DataGridTemplateColumn Width="*"
                                                                    Header="Vulnerability ID"
                                                                    HeaderStyle="{StaticResource CustomCenterAlignedDataGridHeaderStyle}">
                                                <DataGridTemplateColumn.CellTemplate>
                                                    <DataTemplate>
                                                        <TextBlock Text="{Binding UniqueVulnerabilityIdentifier}">
                                                            <TextBlock.ToolTip>
                                                                <StackPanel MaxWidth="250">
                                                                    <Label Content="Title"
                                                                           Style="{StaticResource ThirdLevelHeaderStyle}" />
                                                                    <TextBlock Margin="5,0,0,0"
                                                                               Text="{Binding VulnerabilityTitle}"
                                                                               TextWrapping="Wrap" />
                                                                    <Label Content="Source(s)"
                                                                           Style="{StaticResource ThirdLevelHeaderStyle}" />
                                                                    <ListView Margin="5,0,0,0"
                                                                              BorderThickness="0"
                                                                              DisplayMemberPath="SourceName"
                                                                              IsEnabled="False"
                                                                              ItemsSource="{Binding VulnerabilitySources}" />
                                                                </StackPanel>
                                                            </TextBlock.ToolTip>
                                                        </TextBlock>
                                                    </DataTemplate>
                                                </DataGridTemplateColumn.CellTemplate>
                                            </DataGridTemplateColumn>
                                            <DataGridTextColumn Width="*"
                                                                Binding="{Binding VulnerabilityGroupIdentifier}"
                                                                Header="Group ID"
                                                                HeaderStyle="{StaticResource CustomCenterAlignedDataGridHeaderStyle}" />
                                            <DataGridTextColumn Width="Auto"
                                                                Binding="{Binding PrimaryRawRiskIndicator}"
                                                                Header="Raw Risk"
                                                                HeaderStyle="{StaticResource CustomCenterAlignedDataGridHeaderStyle}" />
                                        </DataGrid.Columns>
                                    </DataGrid>
                                </Grid>
                                <TextBox Margin="0,0,0,5"
                                         Controls:TextBoxHelper.Watermark="Vulnerability Unique Identifier (Read Only)"
                                         vh:DependencyProperties.PrimaryValue="{Binding EditableMitigationsOrCondition.Vulnerability.UniqueVulnerabilityIdentifier, Mode=OneWay}"
                                         IsReadOnly="True"
                                         Style="{StaticResource HeaderedTextBoxStyle}"
                                         Visibility="{Binding SelectedMitigationsOrCondition, Converter={StaticResource IsNullToCollapsedConverter}}" />
                                <TextBox Margin="0,0,0,5"
                                         Controls:TextBoxHelper.Watermark="Vulnerability Group Identifier (Read Only)"
                                         vh:DependencyProperties.PrimaryValue="{Binding EditableMitigationsOrCondition.Vulnerability.VulnerabilityGroup_ID, Mode=OneWay}"
                                         IsReadOnly="True"
                                         Style="{StaticResource HeaderedTextBoxStyle}"
                                         Visibility="{Binding SelectedMitigationsOrCondition, Converter={StaticResource IsNullToCollapsedConverter}}" />
                                <TextBox Margin="0,0,0,5"
                                         Controls:TextBoxHelper.Watermark="Vulnerability Alternate Identifier (Read Only)"
                                         vh:DependencyProperties.PrimaryValue="{Binding EditableMitigationsOrCondition.Vulnerability.SecondaryVulnerabilityIdentifier, Mode=OneWay}"
                                         IsReadOnly="True"
                                         Style="{StaticResource HeaderedTextBoxStyle}"
                                         Visibility="{Binding SelectedMitigationsOrCondition, Converter={StaticResource IsNullToCollapsedConverter}}" />
                                <ComboBox Margin="0,0,0,5"
                                          Controls:TextBoxHelper.Watermark="Associated Group"
                                          vh:DependencyProperties.PrimaryValue="{Binding MitigationGroup, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                          DisplayMemberPath="GroupName"
                                          ItemsSource="{Binding Groups}"
                                          Style="{StaticResource HeaderedComboBoxStyle}" />
                                <ComboBox Margin="0,0,0,5"
                                          Controls:TextBoxHelper.Watermark="Mitigated Status"
                                          vh:DependencyProperties.AlternateValueTrigger="{Binding SelectedMitigationsOrCondition}"
                                          vh:DependencyProperties.PrimaryValue="{Binding MitigatedStatus, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                          vh:DependencyProperties.SecondaryValue="{Binding EditableMitigationsOrCondition.MitigationOrCondition.MitigatedStatus, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                          ItemsSource="{Binding MitigationStatuses}"
                                          Style="{StaticResource HeaderedComboBoxStyle}" />
                                <TextBox Height="200"
                                         Margin="0,0,0,5"
                                         Controls:TextBoxHelper.Watermark="Impact Description&#x0a;(Max 2000 Characters)"
                                         vh:DependencyProperties.AlternateValueTrigger="{Binding SelectedMitigationsOrCondition}"
                                         vh:DependencyProperties.FloatingWatermark="Impact Description"
                                         vh:DependencyProperties.PrimaryValue="{Binding ImpactDescription, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                         vh:DependencyProperties.SecondaryValue="{Binding EditableMitigationsOrCondition.MitigationOrCondition.ImpactDescription, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                         vh:DependencyProperties.ShowCharacterCount="True"
                                         AcceptsReturn="True"
                                         AcceptsTab="True"
                                         MaxLength="2000"
                                         Style="{StaticResource HeaderedTextBoxStyle}"
                                         TextWrapping="Wrap"
                                         HorizontalScrollBarVisibility="Disabled"
                                         VerticalScrollBarVisibility="Auto" />
                                <TextBox Height="200"
                                         Margin="0,0,0,5"
                                         Controls:TextBoxHelper.Watermark="Predisposing Condition(s)&#x0a;(Max 2000 Characters)"
                                         vh:DependencyProperties.AlternateValueTrigger="{Binding SelectedMitigationsOrCondition}"
                                         vh:DependencyProperties.FloatingWatermark="Predisposing Condition(s)"
                                         vh:DependencyProperties.PrimaryValue="{Binding PredisposingConditions, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                         vh:DependencyProperties.SecondaryValue="{Binding EditableMitigationsOrCondition.MitigationOrCondition.PredisposingConditions, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                         vh:DependencyProperties.ShowCharacterCount="True"
                                         AcceptsReturn="True"
                                         AcceptsTab="True"
                                         MaxLength="2000"
                                         Style="{StaticResource HeaderedTextBoxStyle}"
                                         TextWrapping="Wrap"
                                         HorizontalScrollBarVisibility="Disabled"
                                         VerticalScrollBarVisibility="Auto" />
                                <TextBox Height="200"
                                         Margin="0,0,0,5"
                                         Controls:TextBoxHelper.Watermark="Technical Mitigation(s)&#x0a;(Max 2000 Characters)"
                                         vh:DependencyProperties.AlternateValueTrigger="{Binding SelectedMitigationsOrCondition}"
                                         vh:DependencyProperties.FloatingWatermark="Technical Mitigation(s)"
                                         vh:DependencyProperties.PrimaryValue="{Binding TechnicalMitigations, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                         vh:DependencyProperties.SecondaryValue="{Binding EditableMitigationsOrCondition.MitigationOrCondition.TechnicalMitigation, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                         vh:DependencyProperties.ShowCharacterCount="True"
                                         AcceptsReturn="True"
                                         AcceptsTab="True"
                                         MaxLength="2000"
                                         Style="{StaticResource HeaderedTextBoxStyle}"
                                         TextWrapping="Wrap"
                                         HorizontalScrollBarVisibility="Disabled"
                                         VerticalScrollBarVisibility="Auto" />
                                <DatePicker Margin="0,0,0,5"
                                            Controls:TextBoxHelper.Watermark="Estimated Completion Date"
                                            vh:DependencyProperties.AlternateValueTrigger="{Binding SelectedMitigationsOrCondition}"
                                            vh:DependencyProperties.PrimaryValue="{Binding EstimatedCompletionDate, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                            vh:DependencyProperties.SecondaryValue="{Binding EditableMitigationsOrCondition.MitigationOrCondition.EstimatedCompletionDate, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                            Style="{StaticResource HeaderedDatePickerStyle}" />
                                <TextBox Height="200"
                                         Margin="0,0,0,5"
                                         Controls:TextBoxHelper.Watermark="Threat Description&#x0a;(Max 2000 Characters)"
                                         vh:DependencyProperties.AlternateValueTrigger="{Binding SelectedMitigationsOrCondition}"
                                         vh:DependencyProperties.FloatingWatermark="Threat Description"
                                         vh:DependencyProperties.PrimaryValue="{Binding ThreatDescription, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                         vh:DependencyProperties.SecondaryValue="{Binding EditableMitigationsOrCondition.MitigationOrCondition.ThreatDescription, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                         vh:DependencyProperties.ShowCharacterCount="True"
                                         AcceptsReturn="True"
                                         AcceptsTab="True"
                                         MaxLength="2000"
                                         Style="{StaticResource HeaderedTextBoxStyle}"
                                         TextWrapping="Wrap"
                                         HorizontalScrollBarVisibility="Disabled"
                                         VerticalScrollBarVisibility="Auto" />
                                <vh:CommandEnabledComboBox x:Name="mitigationThreatComboBox"
                                                           Margin="0,0,0,5"
                                                           Controls:TextBoxHelper.Watermark="Threat Relevance"
                                                           vh:DependencyProperties.AlternateValueTrigger="{Binding SelectedMitigationsOrCondition}"
                                                           vh:DependencyProperties.PrimaryValue="{Binding ThreatRelevance, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                                           vh:DependencyProperties.SecondaryValue="{Binding EditableMitigationsOrCondition.MitigationOrCondition.ThreatRelevance, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                                           Command="{Binding CalculateLikelihoodCommand}"
                                                           CommandParameter="{Binding ElementName=mitigationThreatComboBox, Path=Name}"
                                                           ItemsSource="{Binding RmfValues}"
                                                           Style="{StaticResource HeaderedComboBoxStyle}" />
                                <vh:CommandEnabledComboBox x:Name="mitigationSeverityComboBox"
                                                           Margin="0,0,0,5"
                                                           Controls:TextBoxHelper.Watermark="Severity / Pervasiveness"
                                                           vh:DependencyProperties.AlternateValueTrigger="{Binding SelectedMitigationsOrCondition}"
                                                           vh:DependencyProperties.PrimaryValue="{Binding SeverityPervasiveness, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                                           vh:DependencyProperties.SecondaryValue="{Binding EditableMitigationsOrCondition.MitigationOrCondition.SeverityPervasiveness, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                                           Command="{Binding CalculateLikelihoodCommand}"
                                                           CommandParameter="{Binding ElementName=mitigationSeverityComboBox, Path=Name}"
                                                           ItemsSource="{Binding RmfValues}"
                                                           Style="{StaticResource HeaderedComboBoxStyle}" />
                                <TextBox Margin="0,0,0,5"
                                         Controls:TextBoxHelper.Watermark="Likelihood (Calculated)"
                                         vh:DependencyProperties.AlternateValueTrigger="{Binding SelectedMitigationsOrCondition}"
                                         vh:DependencyProperties.PrimaryValue="{Binding Likelihood, Mode=OneWay}"
                                         vh:DependencyProperties.SecondaryValue="{Binding EditableMitigationsOrCondition.MitigationOrCondition.Likelihood, Mode=OneWay}"
                                         IsReadOnly="True"
                                         Style="{StaticResource HeaderedTextBoxStyle}" />
                                <vh:CommandEnabledComboBox x:Name="mitigationImpactComboBox"
                                                           Margin="0,0,0,5"
                                                           Controls:TextBoxHelper.Watermark="Impact"
                                                           vh:DependencyProperties.AlternateValueTrigger="{Binding SelectedMitigationsOrCondition}"
                                                           vh:DependencyProperties.PrimaryValue="{Binding Impact, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                                           vh:DependencyProperties.SecondaryValue="{Binding EditableMitigationsOrCondition.MitigationOrCondition.Impact, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                                           Command="{Binding CalculateRiskCommand}"
                                                           CommandParameter="{Binding ElementName=mitigationImpactComboBox, Path=Name}"
                                                           ItemsSource="{Binding RmfValues}"
                                                           Style="{StaticResource HeaderedComboBoxStyle}" />
                                <TextBox Margin="0,0,0,5"
                                         Controls:TextBoxHelper.Watermark="Risk (Calculated)"
                                         vh:DependencyProperties.AlternateValueTrigger="{Binding SelectedMitigationsOrCondition}"
                                         vh:DependencyProperties.PrimaryValue="{Binding Risk, Mode=OneWay}"
                                         vh:DependencyProperties.SecondaryValue="{Binding EditableMitigationsOrCondition.MitigationOrCondition.Risk, Mode=OneWay}"
                                         IsReadOnly="True"
                                         Style="{StaticResource HeaderedTextBoxStyle}" />
                                <ComboBox Margin="0,0,0,5"
                                          Controls:TextBoxHelper.Watermark="Residual Risk"
                                          vh:DependencyProperties.AlternateValueTrigger="{Binding SelectedMitigationsOrCondition}"
                                          vh:DependencyProperties.PrimaryValue="{Binding ResidualRisk, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                          vh:DependencyProperties.SecondaryValue="{Binding EditableMitigationsOrCondition.MitigationOrCondition.ResidualRisk, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                          ItemsSource="{Binding RmfValues}"
                                          Style="{StaticResource HeaderedComboBoxStyle}" />
                                <TextBox Height="200"
                                         Margin="0,0,0,5"
                                         Controls:TextBoxHelper.Watermark="Proposed Mitigation(s)&#x0a;(Max 2000 Characters)"
                                         vh:DependencyProperties.AlternateValueTrigger="{Binding SelectedMitigationsOrCondition}"
                                         vh:DependencyProperties.FloatingWatermark="Proposed Mitigation(s)"
                                         vh:DependencyProperties.PrimaryValue="{Binding ProposedMitigations, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                         vh:DependencyProperties.SecondaryValue="{Binding EditableMitigationsOrCondition.MitigationOrCondition.ProposedMitigation, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                         vh:DependencyProperties.ShowCharacterCount="True"
                                         AcceptsReturn="True"
                                         AcceptsTab="True"
                                         MaxLength="2000"
                                         Style="{StaticResource HeaderedTextBoxStyle}"
                                         TextWrapping="Wrap"
                                         HorizontalScrollBarVisibility="Disabled"
                                         VerticalScrollBarVisibility="Auto" />
                                <ComboBox Margin="0,0,0,5"
                                          Controls:TextBoxHelper.Watermark="Residual Risk After Proposed Mitigation(s)"
                                          vh:DependencyProperties.AlternateValueTrigger="{Binding SelectedMitigationsOrCondition}"
                                          vh:DependencyProperties.PrimaryValue="{Binding ResidualRiskAfterProposed, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                          vh:DependencyProperties.SecondaryValue="{Binding EditableMitigationsOrCondition.MitigationOrCondition.ResidualRiskAfterProposed, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                          ItemsSource="{Binding RmfValues}"
                                          Style="{StaticResource HeaderedComboBoxStyle}" />
                                <Button Margin="0,0,0,5"
                                        HorizontalAlignment="Center"
                                        Command="{Binding ModifyMitigationCommand}"
                                        Content="Add/Update Mitigation(s)" />
                            </StackPanel>
                        </ScrollViewer>
                    </Expander>
                    <!--  TODO: Implement filtering and bulk processing  -->
                    <!--<Expander Grid.Column="3" Background="{DynamicResource WindowBackgroundBrush}" BorderThickness="0" ExpandDirection="Right">
                        <Expander.Header>
                            <Label Foreground="{DynamicResource LabelTextBrush}">
                                <Label.LayoutTransform>
                                    <RotateTransform Angle="90" />
                                </Label.LayoutTransform>
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition Width="Auto" />
                                    </Grid.ColumnDefinitions>
                                    <IconPacks:PackIconMaterial Grid.Column="0" Margin="5" HorizontalAlignment="Center" VerticalAlignment="Center" Kind="FilterOutline">
                                        <IconPacks:PackIconMaterial.LayoutTransform>
                                            <RotateTransform Angle="-90" />
                                        </IconPacks:PackIconMaterial.LayoutTransform>
                                    </IconPacks:PackIconMaterial>
                                    <TextBlock Grid.Column="1" Margin="5,0" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{DynamicResource LabelTextBrush}" Text="Filter" TextTrimming="CharacterEllipsis" />
                                </Grid>
                            </Label>
                        </Expander.Header>
                    </Expander>
                    <Expander Grid.Column="4" Background="{DynamicResource WindowBackgroundBrush}" BorderThickness="0" ExpandDirection="Right">
                        <Expander.Header>
                            <Label Foreground="{DynamicResource LabelTextBrush}">
                                <Label.LayoutTransform>
                                    <RotateTransform Angle="90" />
                                </Label.LayoutTransform>
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition Width="Auto" />
                                    </Grid.ColumnDefinitions>
                                    <IconPacks:PackIconMaterial Grid.Column="0" Margin="5" HorizontalAlignment="Center" VerticalAlignment="Center" Kind="CheckAll">
                                        <IconPacks:PackIconMaterial.LayoutTransform>
                                            <RotateTransform Angle="-90" />
                                        </IconPacks:PackIconMaterial.LayoutTransform>
                                    </IconPacks:PackIconMaterial>
                                    <TextBlock Grid.Column="1" Margin="5,0" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{DynamicResource LabelTextBrush}" Text="Bulk Process" TextTrimming="CharacterEllipsis" />
                                </Grid>
                            </Label>
                        </Expander.Header>
                    </Expander>
                    <Expander Grid.Column="3" Background="{DynamicResource WindowBackgroundBrush}" BorderThickness="0" ExpandDirection="Right">
                        <Expander.Header>
                            <Label Foreground="{DynamicResource LabelTextBrush}">
                                <Label.LayoutTransform>
                                    <RotateTransform Angle="90" />
                                </Label.LayoutTransform>
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition Width="Auto" />
                                    </Grid.ColumnDefinitions>
                                    <IconPacks:PackIconMaterialLight Grid.Column="0" Margin="5" HorizontalAlignment="Center" VerticalAlignment="Center" Kind="CloudDownload">
                                        <IconPacks:PackIconMaterialLight.LayoutTransform>
                                            <RotateTransform Angle="-90" />
                                        </IconPacks:PackIconMaterialLight.LayoutTransform>
                                    </IconPacks:PackIconMaterialLight>
                                    <TextBlock Grid.Column="1" Margin="5,0" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{DynamicResource LabelTextBrush}" Text="Reporting" TextTrimming="CharacterEllipsis" />
                                </Grid>
                            </Label>
                        </Expander.Header>
                    </Expander>-->
                </Grid>
            </TabItem>
            <TabItem Header="CCI Mapping"
                     Style="{StaticResource CustomMetroTabItem}"
                     Visibility="Collapsed">
                <Grid Margin="{StaticResource MarginLeftRightBottom5}">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>
                    <DockPanel Grid.Column="0">
                        <DataGrid CanUserDeleteRows="False"
                                  DockPanel.Dock="Top"
                                  ItemsSource="{Binding Vulnerabilities}"
                                  SelectedItem="{Binding SelectedVulnerability}"
                                  Style="{StaticResource GreyBorderedDataGridStyle}">
                            <DataGrid.Columns>
                                <DataGridTemplateColumn x:Name="nistMappingCheckBoxColumn"
                                                        Width="Auto">
                                    <DataGridTemplateColumn.CellTemplate>
                                        <DataTemplate>
                                            <CheckBox Margin="5,0,0,0"
                                                      HorizontalAlignment="Center"
                                                      IsChecked="{Binding IsChecked, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                                      Style="{StaticResource CustomCheckBox}" />
                                        </DataTemplate>
                                    </DataGridTemplateColumn.CellTemplate>
                                </DataGridTemplateColumn>
                                <DataGridTextColumn Width="Auto"
                                                    Binding="{Binding UniqueVulnerabilityIdentifier}"
                                                    Header="Vulnerability ID"
                                                    HeaderStyle="{StaticResource CustomCenterAlignedDataGridHeaderStyle}"
                                                    IsReadOnly="True">
                                    <DataGridTextColumn.ElementStyle>
                                        <Style BasedOn="{StaticResource MetroTextBlock}"
                                               TargetType="TextBlock">
                                            <Setter Property="HorizontalAlignment" Value="Center" />
                                            <Setter Property="TextTrimming" Value="CharacterEllipsis" />
                                            <Setter Property="TextWrapping" Value="NoWrap" />
                                        </Style>
                                    </DataGridTextColumn.ElementStyle>
                                </DataGridTextColumn>
                                <DataGridTextColumn Width="*"
                                                    Binding="{Binding VulnerabilityTitle}"
                                                    Header="Vulnerability Title"
                                                    HeaderStyle="{StaticResource CustomLeftAlignedDataGridHeaderStyle}"
                                                    IsReadOnly="True">
                                    <DataGridTextColumn.ElementStyle>
                                        <Style BasedOn="{StaticResource MetroTextBlock}"
                                               TargetType="TextBlock">
                                            <Setter Property="TextTrimming" Value="CharacterEllipsis" />
                                            <Setter Property="TextWrapping" Value="NoWrap" />
                                        </Style>
                                    </DataGridTextColumn.ElementStyle>
                                </DataGridTextColumn>
                                <DataGridTextColumn Width="Auto"
                                                    Binding="{Binding PrimaryRawRiskIndicator}"
                                                    Header="Raw Risk"
                                                    HeaderStyle="{StaticResource CustomCenterAlignedDataGridHeaderStyle}"
                                                    IsReadOnly="True">
                                    <DataGridTextColumn.ElementStyle>
                                        <Style BasedOn="{StaticResource MetroTextBlock}"
                                               TargetType="TextBlock">
                                            <Setter Property="HorizontalAlignment" Value="Center" />
                                            <Setter Property="TextTrimming" Value="CharacterEllipsis" />
                                            <Setter Property="TextWrapping" Value="NoWrap" />
                                        </Style>
                                    </DataGridTextColumn.ElementStyle>
                                </DataGridTextColumn>
                                <DataGridTextColumn Width="*"
                                                    Header="Approver"
                                                    HeaderStyle="{StaticResource CustomLeftAlignedDataGridHeaderStyle}">
                                    <DataGridTextColumn.ElementStyle>
                                        <Style BasedOn="{StaticResource MetroTextBlock}"
                                               TargetType="TextBlock">
                                            <Setter Property="TextTrimming" Value="CharacterEllipsis" />
                                            <Setter Property="TextWrapping" Value="NoWrap" />
                                        </Style>
                                    </DataGridTextColumn.ElementStyle>
                                    <DataGridTextColumn.EditingElementStyle>
                                        <Style BasedOn="{StaticResource HeaderedTextBoxStyle}"
                                               TargetType="TextBox">
                                            <Setter Property="Controls:TextBoxHelper.Watermark" Value="Approver" />
                                            <Setter Property="IsReadOnly" Value="True" />
                                            <Setter Property="Margin" Value="0,5,5,5" />
                                            <Setter Property="vh:DependencyProperties.FloatingWatermarkForeground" Value="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=DataGridRow}, Path=Foreground}" />
                                        </Style>
                                    </DataGridTextColumn.EditingElementStyle>
                                </DataGridTextColumn>
                                <DataGridTemplateColumn Width="Auto"
                                                        Header="Approved"
                                                        HeaderStyle="{StaticResource CustomCenterAlignedDataGridHeaderStyle}">
                                    <DataGridTemplateColumn.CellTemplate>
                                        <DataTemplate>
                                            <CheckBox Margin="5,0,0,0"
                                                      HorizontalAlignment="Center"
                                                      IsChecked="{Binding IsChecked}"
                                                      Style="{StaticResource CustomCheckBox}" />
                                        </DataTemplate>
                                    </DataGridTemplateColumn.CellTemplate>
                                </DataGridTemplateColumn>
                            </DataGrid.Columns>
                            <DataGrid.RowDetailsTemplate>
                                <DataTemplate>
                                    <Grid>
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="{Binding ElementName=nistMappingCheckBoxColumn, Path=ActualWidth}" />
                                            <ColumnDefinition Width="*" />
                                        </Grid.ColumnDefinitions>

                                    </Grid>
                                </DataTemplate>
                            </DataGrid.RowDetailsTemplate>
                            <i:Interaction.Triggers>
                                <i:EventTrigger EventName="SelectionChanged">
                                    <i:InvokeCommandAction Command="{Binding ShowSelectedControlsCommand}"
                                                           CommandParameter="{Binding Path=SelectedItem, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=DataGrid}}" />
                                </i:EventTrigger>
                            </i:Interaction.Triggers>
                        </DataGrid>
                    </DockPanel>
                    <Expander Grid.Column="1"
                              Background="{DynamicResource WindowBackgroundBrush}"
                              BorderThickness="0"
                              ExpandDirection="Right"
                              Style="{StaticResource CustomExpander}">
                        <Expander.Header>
                            <Label Foreground="{DynamicResource LabelTextBrush}">
                                <Label.LayoutTransform>
                                    <RotateTransform Angle="90" />
                                </Label.LayoutTransform>
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition Width="Auto" />
                                    </Grid.ColumnDefinitions>
                                    <IconPacks:PackIconFontAwesomeLight Grid.Column="0"
                                                                        Margin="5"
                                                                        HorizontalAlignment="Center"
                                                                        VerticalAlignment="Center"
                                                                        Kind="PencilAlt">
                                        <IconPacks:PackIconFontAwesomeLight.LayoutTransform>
                                            <RotateTransform Angle="-90" />
                                        </IconPacks:PackIconFontAwesomeLight.LayoutTransform>
                                    </IconPacks:PackIconFontAwesomeLight>
                                    <TextBlock Grid.Column="1"
                                               Margin="5,0"
                                               HorizontalAlignment="Center"
                                               VerticalAlignment="Center"
                                               Foreground="{DynamicResource LabelTextBrush}"
                                               Text="Update CCI Mapping"
                                               TextTrimming="CharacterEllipsis" />
                                </Grid>
                            </Label>
                        </Expander.Header>
                        <ScrollViewer Width="600"
                                      HorizontalScrollBarVisibility="Disabled"
                                      VerticalScrollBarVisibility="Auto">
                            <StackPanel>
                                <DataGrid Height="400"
                                          Margin="0,0,5,5"
                                          ItemsSource="{Binding NistControlsCcis}"
                                          SelectedItem="{Binding SelectedNistControlCci, Mode=TwoWay}"
                                          Style="{StaticResource GreyBorderedDataGridStyle}">
                                    <DataGrid.Columns>
                                        <DataGridTemplateColumn Width="Auto">
                                            <DataGridTemplateColumn.CellTemplate>
                                                <DataTemplate>
                                                    <CheckBox Margin="5,0,0,0"
                                                              HorizontalAlignment="Center"
                                                              Command="{Binding DataContext.UpdateVulnerabilityCciMappingCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=DataGrid}}"
                                                              IsChecked="{Binding IsChecked, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                                              Style="{StaticResource CustomCheckBox}" />
                                                </DataTemplate>
                                            </DataGridTemplateColumn.CellTemplate>
                                        </DataGridTemplateColumn>
                                        <DataGridTextColumn Width="Auto"
                                                            Binding="{Binding DOD_AssessmentProcedureMapping}"
                                                            Header="AP"
                                                            HeaderStyle="{StaticResource CustomCenterAlignedDataGridHeaderStyle}"
                                                            IsReadOnly="True">
                                            <DataGridTextColumn.ElementStyle>
                                                <Style BasedOn="{StaticResource MetroTextBlock}"
                                                       TargetType="TextBlock">
                                                    <Setter Property="HorizontalAlignment" Value="Center" />
                                                    <Setter Property="TextTrimming" Value="CharacterEllipsis" />
                                                    <Setter Property="TextWrapping" Value="NoWrap" />
                                                </Style>
                                            </DataGridTextColumn.ElementStyle>
                                        </DataGridTextColumn>
                                        <DataGridTextColumn Width="Auto"
                                                            Binding="{Binding ControlIndicator}"
                                                            Header="Indicator"
                                                            HeaderStyle="{StaticResource CustomCenterAlignedDataGridHeaderStyle}"
                                                            IsReadOnly="True">
                                            <DataGridTextColumn.ElementStyle>
                                                <Style BasedOn="{StaticResource MetroTextBlock}"
                                                       TargetType="TextBlock">
                                                    <Setter Property="HorizontalAlignment" Value="Center" />
                                                    <Setter Property="TextTrimming" Value="CharacterEllipsis" />
                                                    <Setter Property="TextWrapping" Value="NoWrap" />
                                                </Style>
                                            </DataGridTextColumn.ElementStyle>
                                        </DataGridTextColumn>
                                        <DataGridTextColumn Width="Auto"
                                                            Binding="{Binding CCI.CCI_Number}"
                                                            Header="CCI"
                                                            HeaderStyle="{StaticResource CustomCenterAlignedDataGridHeaderStyle}"
                                                            IsReadOnly="True">
                                            <DataGridTextColumn.ElementStyle>
                                                <Style BasedOn="{StaticResource MetroTextBlock}"
                                                       TargetType="TextBlock">
                                                    <Setter Property="HorizontalAlignment" Value="Center" />
                                                    <Setter Property="Padding" Value="5,0" />
                                                    <Setter Property="TextTrimming" Value="CharacterEllipsis" />
                                                    <Setter Property="TextWrapping" Value="NoWrap" />
                                                </Style>
                                            </DataGridTextColumn.ElementStyle>
                                        </DataGridTextColumn>
                                        <DataGridTextColumn Width="*"
                                                            Binding="{Binding CCI.CCI_Definition}"
                                                            Header="Definition"
                                                            HeaderStyle="{StaticResource CustomLeftAlignedDataGridHeaderStyle}"
                                                            IsReadOnly="True">
                                            <DataGridTextColumn.ElementStyle>
                                                <Style BasedOn="{StaticResource MetroTextBlock}"
                                                       TargetType="TextBlock">
                                                    <Setter Property="HorizontalAlignment" Value="Left" />
                                                    <Setter Property="TextWrapping" Value="Wrap" />
                                                </Style>
                                            </DataGridTextColumn.ElementStyle>
                                        </DataGridTextColumn>
                                    </DataGrid.Columns>
                                </DataGrid>
                                <TextBox Margin="0,0,5,5"
                                         Controls:TextBoxHelper.Watermark="Implementation Guidance (Read Only)"
                                         IsReadOnly="True"
                                         Style="{StaticResource HeaderedTextBoxStyle}"
                                         Text="{Binding SelectedNistControlCci.ImplementationGuidance}"
                                         TextWrapping="Wrap" />
                                <TextBox Margin="0,0,5,5"
                                         Controls:TextBoxHelper.Watermark="Assessment Procedure (Read Only)"
                                         IsReadOnly="True"
                                         Style="{StaticResource HeaderedTextBoxStyle}"
                                         Text="{Binding SelectedNistControlCci.AssessmentProcedureText}"
                                         TextWrapping="Wrap" />
                                <Button Margin="0,0,0,5"
                                        HorizontalAlignment="Center"
                                        Content="Update" />
                            </StackPanel>
                        </ScrollViewer>
                    </Expander>
                    <Expander Grid.Column="2"
                              Background="{DynamicResource WindowBackgroundBrush}"
                              BorderThickness="0"
                              ExpandDirection="Right"
                              IsExpanded="{Binding BulkProcessExpanded}"
                              Style="{StaticResource CustomExpander}">
                        <Expander.Header>
                            <Label Foreground="{DynamicResource LabelTextBrush}">
                                <Label.LayoutTransform>
                                    <RotateTransform Angle="90" />
                                </Label.LayoutTransform>
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition Width="Auto" />
                                    </Grid.ColumnDefinitions>
                                    <IconPacks:PackIconFontAwesomeLight Grid.Column="0"
                                                                        Margin="5"
                                                                        HorizontalAlignment="Center"
                                                                        VerticalAlignment="Center"
                                                                        Kind="Tasks">
                                        <IconPacks:PackIconFontAwesomeLight.LayoutTransform>
                                            <RotateTransform Angle="-90" />
                                        </IconPacks:PackIconFontAwesomeLight.LayoutTransform>
                                    </IconPacks:PackIconFontAwesomeLight>
                                    <TextBlock Grid.Column="1"
                                               Margin="5,0"
                                               HorizontalAlignment="Center"
                                               VerticalAlignment="Center"
                                               Foreground="{DynamicResource LabelTextBrush}"
                                               Text="Bulk Process CCI Mappings"
                                               TextTrimming="CharacterEllipsis" />
                                </Grid>
                            </Label>
                        </Expander.Header>
                        <Grid HorizontalAlignment="Stretch"
                              VerticalAlignment="Stretch">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="*" />
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <DataGrid Margin="{StaticResource MarginLeftRightBottom5}"
                                      ItemsSource="{Binding BulkNistControlsCcis}"
                                      Style="{StaticResource GreyBorderedDataGridStyle}">
                                <DataGrid.Columns>
                                    <DataGridTemplateColumn x:Name="bulkNistCheckBoxColumn"
                                                            Width="Auto">
                                        <DataGridTemplateColumn.CellTemplate>
                                            <DataTemplate>
                                                <CheckBox Margin="5,0,0,0"
                                                          HorizontalAlignment="Center"
                                                          IsChecked="{Binding IsChecked, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                                          Style="{StaticResource CustomCheckBox}" />
                                            </DataTemplate>
                                        </DataGridTemplateColumn.CellTemplate>
                                    </DataGridTemplateColumn>
                                    <DataGridTextColumn Width="Auto"
                                                        Binding="{Binding DOD_AssessmentProcedureMapping}"
                                                        Header="DoD Assessment Procedure"
                                                        HeaderStyle="{StaticResource CustomCenterAlignedDataGridHeaderStyle}"
                                                        IsReadOnly="True">
                                        <DataGridTextColumn.ElementStyle>
                                            <Style BasedOn="{StaticResource MetroTextBlock}"
                                                   TargetType="TextBlock">
                                                <Setter Property="HorizontalAlignment" Value="Center" />
                                                <Setter Property="TextTrimming" Value="CharacterEllipsis" />
                                                <Setter Property="TextWrapping" Value="NoWrap" />
                                            </Style>
                                        </DataGridTextColumn.ElementStyle>
                                    </DataGridTextColumn>
                                    <DataGridTextColumn Width="Auto"
                                                        Binding="{Binding ControlIndicator}"
                                                        Header="Control Indicator"
                                                        HeaderStyle="{StaticResource CustomCenterAlignedDataGridHeaderStyle}"
                                                        IsReadOnly="True">
                                        <DataGridTextColumn.ElementStyle>
                                            <Style BasedOn="{StaticResource MetroTextBlock}"
                                                   TargetType="TextBlock">
                                                <Setter Property="HorizontalAlignment" Value="Center" />
                                                <Setter Property="TextTrimming" Value="CharacterEllipsis" />
                                                <Setter Property="TextWrapping" Value="NoWrap" />
                                            </Style>
                                        </DataGridTextColumn.ElementStyle>
                                    </DataGridTextColumn>
                                    <DataGridTextColumn Width="Auto"
                                                        Binding="{Binding CCI.CCI_Number}"
                                                        Header="Control Correlation Identifier"
                                                        HeaderStyle="{StaticResource CustomCenterAlignedDataGridHeaderStyle}"
                                                        IsReadOnly="True">
                                        <DataGridTextColumn.ElementStyle>
                                            <Style BasedOn="{StaticResource MetroTextBlock}"
                                                   TargetType="TextBlock">
                                                <Setter Property="HorizontalAlignment" Value="Center" />
                                                <Setter Property="TextTrimming" Value="CharacterEllipsis" />
                                                <Setter Property="TextWrapping" Value="NoWrap" />
                                            </Style>
                                        </DataGridTextColumn.ElementStyle>
                                    </DataGridTextColumn>
                                </DataGrid.Columns>
                            </DataGrid>
                            <Button Grid.Row="1"
                                    Margin="{StaticResource MarginLeftRightBottom5}"
                                    HorizontalAlignment="Right"
                                    Command="{Binding BulkUpdatedVulnerabilityCciMappingCommand}"
                                    Content="Apply" />
                        </Grid>
                    </Expander>
                </Grid>
            </TabItem>
        </Controls:MetroAnimatedSingleRowTabControl>
    </Grid>
</UserControl>
