ios - 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!
解决方案
UIView
是容器管理 iOS 中屏幕上矩形区域的内容。UWP 中的等价物是Panel
.
layoutSubviews
将在帧大小更改或添加子视图或滚动滚动视图等时调用。
对于 UWPPanel
来说,也有类似的事件LayoutUpdated
。您可以订阅此事件以监视更新的布局。
推荐阅读
- azure-ad-b2c - AADB2C: 请求 URI ' ' 解析为受限 IP 范围内的 IP 地址
- java - Java 子类化:覆盖和创建新方法
- ruby-on-rails - RAILS_ENV=生产轨道资产:预编译不适用于 RSpec
- node.js - 如何将数组发送到 mongodb 地图集?
- python - 我可以更新文本文件的一部分吗?我已经建立了一个登录系统,我想计算一个用户登录了多少次
- airflow - 外部触发 Airflow DAG 时如何访问配置值?
- python - tsfresh select_features 方法背后的算法
- azure - PowerShell:通过 csv 文件更新 O365 AD 批量属性
- list - 在 Kotlin 中将元素添加到 List ifNotEmpty() 的最惯用方式
- python - 根据条件重置列