<Window x:Class="StructureHelper.Windows.CalculationWindows.CalculatorsViews.GeometryCalculatorViews.GeometryCalculatorResultView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:StructureHelper.Windows.CalculationWindows.CalculatorsViews.GeometryCalculatorViews"
        xmlns:vm="clr-namespace:StructureHelper.Windows.ViewModels.Calculations.Calculators.GeometryCalculatorVMs"
        xmlns:uc="clr-namespace:StructureHelper.Windows.UserControls"
        mc:Ignorable="d"
        d:DataContext="{d:DesignInstance vm:GeometryCalculatorResultViewModel}"
        Title="Geometry Properties" Height="450" Width="850" WindowStartupLocation="CenterScreen">
    <DockPanel>
        <ToolBarTray DockPanel.Dock="Top">
            <ToolBar>
                <Button Style="{DynamicResource ToolButton}" Command="{Binding ExportToCSVCommand}">
                    <Button.ToolTip>
                        <uc:ButtonToolTipEh HeaderText="Export to *.csv"
                                                IconContent="{StaticResource ExportToXLS}"
                                                DescriptionText="Export all valid results to *.csv file"/>
                    </Button.ToolTip>
                    <Viewbox>
                        <ContentControl ContentTemplate="{DynamicResource ExportToXLS}"/>
                    </Viewbox>
                </Button>
            </ToolBar>
        </ToolBarTray>
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <DataGrid x:Name="ResultGrid" IsReadOnly="True" AutoGenerateColumns="False" ItemsSource="{Binding TextParameters}">
                <DataGrid.RowStyle>
                    <Style TargetType="DataGridRow">
                        <Style.Triggers>
                            <DataTrigger Binding="{Binding IsValid}" Value="false">
                                <Setter Property="Background" Value="Pink"/>
                            </DataTrigger>
                        </Style.Triggers>
                    </Style>
                </DataGrid.RowStyle>
                <DataGrid.Columns>
                    <DataGridCheckBoxColumn Header="Valid" Binding="{Binding Path=IsValid}"/>
                    <DataGridTextColumn Header="Name" Width="100" Binding="{Binding Name}"/>
                    <DataGridTextColumn Header="Short" Width="50" Binding="{Binding ShortName}"/>
                    <DataGridTextColumn Header="Unit" Width="100" Binding="{Binding Text}"/>
                    <DataGridTextColumn Header="Value" Width="150" Binding="{Binding Value}"/>
                    <DataGridTextColumn Header="Description" Width="400" Binding="{Binding Description}"/>
                </DataGrid.Columns>
            </DataGrid>
        </Grid>
    </DockPanel>
</Window>
