gpt4 book ai didi

c# - 我可以将列表移到后面吗?

转载 作者:行者123 更新时间:2023-11-30 22:59:48 25 4
gpt4 key购买 nike

我目前使用了不同的数据模板。为了美观的布局,我相应地定位了它们。不幸的是,我的 Entry 前面有一个具有巨大 margin 值的列表。因此该条目不可点击。是否可以将列表推到带有值的条目后面。或者甚至可以插入另一个可点击的空白区域?

伪布局:

<DataTemplate which is smaller at first and then gets overwritten/>
<Empty Label for Spacing with Margin 70 from top/>
<List/>

最佳答案

编辑:您的答案可能会在此线程中找到:How do overlap in Xamarin forms?

简而言之,似乎没有像在 WPF 中那样的简单方法。 Xamarin(尤其是 Xamarin 中的 XAML)仍在进行中。

@KeithRome 在帖子中说了以下内容。

Z-Index is established by the ordering of the Child elements in a container element. The first child is at the back of the Z stack, the second child is placed above it, and so on.

The layout container you are using will dictate how each child is positioned. A StackLayout will not allow overlaps. AbsoluteLayout and RelativeLayout will allow overlaps easily. A Grid will allow overlap for elements that extend into the same row and column. None of these have an appearance of their own (think of them as transparent boxes by default). If you want them to occlude the content behind them, then you will need to assign a background color or image, else they will just be painted right on top of the other content.

尝试在绝对布局中获取 Entry 和 List,然后简单地按照最后添加的元素在顶部的顺序添加布局。

例如,如果我要订购 A、B 和 C,并且我希望 A 在 B 之上在 C 之上:

<Absolute Layout>
<C/>
<B/>
<A/>
<Absolute Layout/>

关于c# - 我可以将列表移到后面吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51942222/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com