首页 > 解决方案 > What is the equivalent of iOS layoutSubviews for UWP?

问题描述

I am porting an iOS app in UWP.

In iOS you can override the method layoutSubviews to perform precise layout.

What is the equivalent concept in UWP?

I cannot override UpdateLayout(), and I cannot find a method that I can touch when the layout is performed.

Thanks!

标签: ioslayoutuwpporting

解决方案


UIView是容器管理 iOS 中屏幕上矩形区域的内容。UWP 中的等价物是Panel.

layoutSubviews将在帧大小更改或添加子视图或滚动滚动视图等时调用。

对于 UWPPanel来说,也有类似的事件LayoutUpdated。您可以订阅此事件以监视更新的布局。


推荐阅读