在Xamarin形式的iOS中,在scrollview中切换堆栈布局的IsVisible不能正确更新 [英] Toggling IsVisible for an stacklayout inside scrollview does not update properly in Xamarin forms iOS

查看:78
本文介绍了在Xamarin形式的iOS中,在scrollview中切换堆栈布局的IsVisible不能正确更新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在滚动视图中有很多 stacklayout 视图,并且根据所选选项,stacklayouts可见性属性设置为"true"或"false".在 Xamarin Forms 1.4.0 中,不能将stacklayout isvisible属性设置为"true",并且不显示stacklayout视图,而只是在视图之间显示空白.但是在 Xamarin中,它工作正常表格1.3.3 .仅在iOS中发生,在android中按预期工作.

I am having lot of stacklayout views inside scrollview, and the stacklayouts visibility property set to "true" or "false" based on the option selected. Making stacklayout isvisible property to "true" is not working in Xamarin Forms 1.4.0 and instead of showing the stacklayout view it's just showing empty space between the views.but it was working fine in Xamarin Forms 1.3.3. happening only in iOS, in android it is working as expected.

任何帮助将不胜感激.

推荐答案

这是Forms中的错误,请参见:

It is a bug in Forms see :

在最后一个线程中有一个解决方法,我个人使用Opacity而不是Visibility,但这并不完美,因为当将Opacity设置为0时,该控件消失了,但是此控件使用的空间仍然存在.

There is a workaround in the last thread, personnly I played with Opacity instead of Visibility, but it is not perfect since when setting Opacity = 0 the control desepears but the space used by this control is still present.

这篇关于在Xamarin形式的iOS中,在scrollview中切换堆栈布局的IsVisible不能正确更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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