如何隐藏PivotItem头? [英] How to hide PivotItem Header?
问题描述
我希望有一个具有PivotItems数据透视控制,但在横向没有支点项目标题文本(它在横向模式下画廊,当恢复到纵向它应该显示PivotItems再次报头)。因为空间被占用的头
I wish to have a Pivot control that has PivotItems but no pivot item Header text in landscape (it's a gallery in landscape mode, when reverted to portrait it should display the PivotItems header again).
使文本 PivotItem.Header =
解决方案是不好文本仍然保留(所以有未使用的空格)。
The solution to make the text PivotItem.Header = ""
is not good since the space occupied by the header text is still reserved (so there's a blank space that is not used).
我怎么可以这样做?
推荐答案
您可以将您的枢纽项目的顶部保证金
设置为负值将它们移动起来:
You can set the top Margin
of your pivot items to a negative value to move them up:
<controls:PivotItem Header="item1" Margin="0,-100,0,0">
它不删除头,但你的库项目将在它的上面,从而有更多的可用空间。你清除字幕,你可以有一个解决方案的理念相结合这一点。
It doesn't remove the header, but your gallery items will be on top of it and thus have more space available. Combine this with your idea of clearing the captions and you could have a solution.
这篇关于如何隐藏PivotItem头?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!