<Window x:Class="RevitEstimate.ElectricalModule.ElectricalResultWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Electrical BOQ &amp; CPWD DSR Estimate" Height="600" Width="1100" WindowStartupLocation="CenterScreen">
    <Grid Margin="15">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>

        <TextBlock Text="Detailed Bill of Quantities (BOQ) - Electrical E&amp;M 2025" FontWeight="Bold" FontSize="16" Margin="0,0,0,10" Foreground="#FF003366"/>

        <DataGrid x:Name="GridBoq" Grid.Row="1" AutoGenerateColumns="False" CanUserAddRows="False" IsReadOnly="True" AlternatingRowBackground="#FFF9F9F9" GridLinesVisibility="All">
            <DataGrid.Columns>
                <DataGridTextColumn Header="S.No" Binding="{Binding SrNo}" Width="50"/>
                <DataGridTextColumn Header="DSR Code" Binding="{Binding DsrCode}" Width="90"/>
                <DataGridTextColumn Header="Category" Binding="{Binding CategoryGroup}" Width="130" FontWeight="SemiBold"/>
                <DataGridTextColumn Header="Description of Item" Binding="{Binding Description}" Width="450">
                    <DataGridTextColumn.ElementStyle>
                        <Style TargetType="TextBlock">
                            <Setter Property="TextWrapping" Value="Wrap"/>
                            <Setter Property="Margin" Value="5"/>
                        </Style>
                    </DataGridTextColumn.ElementStyle>
                </DataGridTextColumn>
                <DataGridTextColumn Header="Unit" Binding="{Binding Unit}" Width="70"/>
                <DataGridTextColumn Header="Total Qty" Binding="{Binding Qty, StringFormat=N2}" Width="80"/>
                <DataGridTextColumn Header="DSR Rate (₹)" Binding="{Binding Rate, StringFormat=N2}" Width="95"/>
                <DataGridTextColumn Header="Amount (₹)" Binding="{Binding Amount, StringFormat=N2}" Width="120" FontWeight="Bold"/>
            </DataGrid.Columns>
        </DataGrid>

        <Grid Grid.Row="2" Margin="0,15,0,0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>

            <TextBlock x:Name="TxtTotalAmount" FontWeight="Bold" FontSize="18" Foreground="#FFB22222" VerticalAlignment="Center"/>

            <Button Grid.Column="1" Content="Export to Excel" Width="150" Height="40" Background="#FF217346" Foreground="White" FontWeight="Bold" Cursor="Hand"/>
        </Grid>
    </Grid>
</Window>