<Window x:Class="RevitEstimate.EstimateWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Revit Civil Estimate - 80 Items Work Report" Height="600" Width="1150">
    <Grid Margin="10">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>

        <!-- Left-aligned Full Width Heading Row -->
        <Border Grid.Row="0" Background="#E0E0E0" Padding="8" Margin="0,0,0,10">
            <TextBlock Text="ESTIMATE OF WORK / QUANTITY REPORT - 80 SCHEDULE ITEMS" 
                       FontWeight="Bold" FontSize="14" HorizontalAlignment="Left"/>
        </Border>

        <TextBlock Text="Detailed Item-wise Quantity Compilation Table with Remarks:" FontWeight="SemiBold" FontSize="12" Grid.Row="1" Margin="0,0,0,5"/>

        <!-- DataGrid with Exact Columns Including Remarks -->
        <DataGrid x:Name="DataGridEstimate" Grid.Row="2" AutoGenerateColumns="False" CanUserAddRows="False" IsReadOnly="True" Margin="0,0,0,10">
            <DataGrid.Columns>
                <DataGridTextColumn Header="S.No." Binding="{Binding SNo}" Width="50"/>
                <DataGridTextColumn Header="ITEM OF WORK" Binding="{Binding ItemOfWork}" Width="320"/>
                <DataGridTextColumn Header="Nos Of Flats" Binding="{Binding NosOfFlats}" Width="80"/>
                <DataGridTextColumn Header="Nos of Instance" Binding="{Binding NosOfInstance}" Width="90"/>
                <DataGridTextColumn Header="Length" Binding="{Binding Length}" Width="75"/>
                <DataGridTextColumn Header="Width" Binding="{Binding Width}" Width="75"/>
                <DataGridTextColumn Header="Height/Depth" Binding="{Binding HeightDepth}" Width="90"/>
                <DataGridTextColumn Header="Qty (vol/Sqm/Rm)" Binding="{Binding Qty}" Width="110"/>
                <DataGridTextColumn Header="Unit" Binding="{Binding Unit}" Width="60"/>
                <DataGridTextColumn Header="Remarks / Logic" Binding="{Binding Remarks}" Width="200"/>
            </DataGrid.Columns>
        </DataGrid>

        <!-- Bottom Actions -->
        <StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Right">
            <Button Content="Export to Excel" Width="120" Height="30" Margin="0,0,10,0" Click="BtnExport_Click"/>
            <Button Content="Close" Width="80" Height="30" Click="BtnClose_Click"/>
        </StackPanel>
    </Grid>
</Window>