如何使用 Xamarin.Forms 覆盖元素 [英] How to overlay elements with Xamarin.Forms

查看:35
本文介绍了如何使用 Xamarin.Forms 覆盖元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只想在顶部创建一个自动完成元素,其中建议列表不会向下移动我的布局中的其余元素.

I simply want to create an Autocomplete element on the top where the suggestion list is not shifting down the remaining elements im my Layout.

我可以尝试将 EntryListView 包装在 AbsoluteLayout 容器中,但对我来说这听起来不是一个干净的解决方案.有没有不同的方法来实现这一目标?

I could try to wrap the Entry and ListView in an AbsoluteLayout container, but for me this sounds not like a clean solution. Is there a different way to achieve this?

推荐答案

如果您使用 Grid,您可以覆盖内容并设置是否应该向左、向右、居中等.最后添加的将在顶部,在你的情况下进入.

If you use a Grid you can overlay stuff and set if should go left, right, center etc.. The last one to be added will be on top, in your case Entry.

这篇关于如何使用 Xamarin.Forms 覆盖元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆