<UserControl x:Class="Artemis.UI.Screens.Settings.Debug.Tabs.Performance.PerformanceDebugProfilerView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:Artemis.UI.Screens.Settings.Debug.Tabs.Performance"
             xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
             mc:Ignorable="d" 
             d:DesignHeight="450" d:DesignWidth="800"
             d:DataContext="{d:DesignInstance local:PerformanceDebugProfilerViewModel}">
    <StackPanel>
        <TextBlock Style="{StaticResource MaterialDesignBody2TextBlock}" Text="{Binding Profiler.Name}" Margin="10 10 0 0" />

        <DataGrid ItemsSource="{Binding Measurements}"
                  d:DataContext="{d:DesignInstance Type={x:Type local:PerformanceDebugMeasurementViewModel}}"
                  CanUserSortColumns="True"
                  IsReadOnly="True"
                  CanUserAddRows="False"
                  AutoGenerateColumns="False"
                  materialDesign:DataGridAssist.CellPadding="16 5 5 5"
                  materialDesign:DataGridAssist.ColumnHeaderPadding="16 5 5 5"
                  CanUserResizeRows="False"
                  Margin="10 5 10 10">
            <DataGrid.Columns>
                <materialDesign:DataGridTextColumn Binding="{Binding Measurement.Identifier}" Header="Identifier" />
                <materialDesign:DataGridTextColumn Binding="{Binding Last}" Header="Last" />
                <materialDesign:DataGridTextColumn Binding="{Binding Min}" Header="Min" />
                <materialDesign:DataGridTextColumn Binding="{Binding Max}" Header="Max" />
                <materialDesign:DataGridTextColumn Binding="{Binding Average}" Header="Average" />
                <materialDesign:DataGridTextColumn Binding="{Binding Percentile}" Header="95th percentile" />
            </DataGrid.Columns>
        </DataGrid>
    </StackPanel>
</UserControl>
