0

I have two rows in the grid and there is white line which separates the rows. How to remove it ?

This is the code that i have written.

<Window x:Class="Test.MainWindow"   
    <Grid ShowGridLines="False">
        <Grid.RowDefinitions>
            <RowDefinition Height="40"></RowDefinition>
            <RowDefinition Height="*"></RowDefinition>
        </Grid.RowDefinitions>

        <!--First Row-->
        <Grid Grid.Row="0" >
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"></ColumnDefinition>
                <ColumnDefinition Width="*"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <TextBlock Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2"/>
        </Grid>

        <!-- Second Row -->
        <Grid Grid.Row="1" >
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="200"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>

            <StackPanel  Orientation="Vertical" Grid.Column="0" Grid.Row="2" Background="#003049">
                <Button Content = "" Width= "auto" Height = "30">
                </Button>
            </StackPanel>
        </Grid>
    </Grid>
</Window>

4
  • please share your code Commented Jul 30, 2019 at 10:19
  • @rashmatash what exactly are you trying to say ? Commented Jul 30, 2019 at 10:43
  • Did you paste the entire code of the xaml? I tried in my computed and works fine, no white line. But the first row and the second column from the second row appear in white, and there is no white line between rows. Please give us all of the code. Commented Jul 30, 2019 at 11:58
  • 1
    The issue is related background color of the window. Changing the color solved the issue. Thank you @CatarinaFerreira. Commented Jul 31, 2019 at 10:23

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.