简体   繁体   English

如何摆脱ListView周围奇怪的白色边框

[英]How to get rid of strange white border around ListView

I have this very simple code for my ListView : 我的ListView有以下非常简单的代码:

<Grid>
<Grid.Background>
     <SolidColorBrush Color="Black" Opacity="0.7"/>
</Grid.Background>
    <!--Date Taken Stuff here not relevant -->
    <ListView>
    <ListView.Background>
         <SolidColorBrush Color="Black" Opacity="0.7"/>
    </ListView.Background>
    </ListView>
</Grid>

Setting the background to the same colour as the grid it is located in to make it appear to merge in. But I get a strange thin white boarder that changed the whole box black when I set BorderTickness=0 将背景设置为与它所位于的网格相同的颜色,使其看起来像是在其中合并。但是当我设置BorderTickness = 0时,我得到了一个奇怪的薄白木板,将整个盒子变成了黑色

在此处输入图片说明

I've never seen that problem before, but setting the border thickness to 0 seems to get rid of it: 我以前从未见过该问题,但是将边框的粗细设置为0似乎可以摆脱它:

<Grid Background="Black">
    <ListView Margin="10" BorderThickness="0" >
        <ListView.Background>
            <SolidColorBrush Color="Black" Opacity="0.7" />
        </ListView.Background>
    </ListView>
</Grid>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM