简体   繁体   English

C#uwp GridView ItemsWrapGrid底边距

[英]c# uwp GridView ItemsWrapGrid bottom margin

In UWP I am creating horizontal GridView. 在UWP中,我正在创建水平GridView。

For ItemsPanelTemplate I am using ItemsWrapGrid as following: 对于ItemsPanelTemplate,我正在使用ItemsWrapGrid,如下所示:

<GridView.ItemsPanel>
    <ItemsPanelTemplate>
        <ItemsWrapGrid Orientation="Vertical"
                       MaximumRowsOrColumns="1"
                       ItemWidth="200"
                       ItemHeight="100"/>
    </ItemsPanelTemplate>
</GridView.ItemsPanel>

The problem is that I have some bottom margin that is the same height as the scrollbar. 问题是我的底边距与滚动条的高度相同。 When scrollbar is hidden there is this empty space, and the items are cutted. 当滚动条被隐藏时,将有一个空白空间,并且这些项目将被剪切。

I have tried to change margins, paddings...but no luck. 我试图更改页边距,填充...但是没有运气。

Any idea? 任何想法?

If anyone have this problem, I have just added: 如果有人有这个问题,我刚刚添加了:

Margin="0,0,0,-10"

inside ItemsWrapGrid. 在ItemsWrapGrid内部。

And it fixed it. 它修复了它。

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

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