Skip to content

MAUI Layout分析

xtuzy edited this page Apr 3, 2024 · 2 revisions

Maui的Layout流程

LayoutManager.Measure流程

  • -> 迭代子View,计算(View as IView).Measure
  • -> View.MeasureOverride
  • -> VisualElement.GetSizeRequest
  • -> 结合VisualElement.WidthRequest和VisualElement.OnMeasure
  • -> VisualElement.OnMeasure调用Handler.GetDesiredSize

LayoutManager.ArrangeChildren -> 迭代子View,计算View.Arrange

Clone this wiki locally