<Window x:Class="RevitEstimate.PlumbingModule.PlumbingReportWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Complete Plumbing Estimate Report" Height="650" Width="1100" WindowStartupLocation="CenterScreen">
    <Grid Margin="15">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <TextBlock Text="Export DSR Estimation &amp; Measurement Sheet:" FontWeight="Bold" FontSize="14" Margin="0,0,0,10"/>

        <DataGrid x:Name="GridReportPreview" Grid.Row="1" AutoGenerateColumns="False" IsReadOnly="True" AlternatingRowBackground="#FFF9F9F9">
            <DataGrid.Columns>
                <DataGridTextColumn Header="Group" Binding="{Binding CategoryGroup}" Width="150" FontWeight="Bold"/>
                <DataGridTextColumn Header="Sr. No." Binding="{Binding SrNo}" Width="50"/>
                <DataGridTextColumn Header="DSR Code" Binding="{Binding DsrCode}" Width="90"/>
                <DataGridTextColumn Header="Description" Binding="{Binding Description}" Width="300"/>
                <DataGridTextColumn Header="Logic / Remark" Binding="{Binding Remark}" Width="180" FontStyle="Italic"/>
                <DataGridTextColumn Header="Unit" Binding="{Binding Unit}" Width="60"/>
                <DataGridTextColumn Header="Qty" Binding="{Binding Qty, StringFormat=N2}" Width="60"/>
                <DataGridTextColumn Header="Rate (₹)" Binding="{Binding Rate, StringFormat=N2}" Width="80"/>
                <DataGridTextColumn Header="Amount (₹)" Binding="{Binding Amount, StringFormat=N2}" Width="100" FontWeight="Bold"/>
            </DataGrid.Columns>
        </DataGrid>

        <Button x:Name="BtnExportCSV" Grid.Row="2" Content="Export to Professional Excel File" Height="40" Background="#FF28A745" Foreground="White" FontWeight="Bold" Margin="0,15,0,0" Click="BtnExportCSV_Click"/>
    </Grid>
</Window>