// TODO: UNO supports WinUI views which have equivalent Markup UI type, plus native views // Markup UI types are created with a helper // A non-view type is created with new // To allow a native type to be added to a layout, below params type should be a base element/interface of all native view types and WinUI types alike // TODO: UNO what is that type for Android/iOS/...? public static LayoutView LayoutView( #region _LayoutViewHelperParameters_ params _PropertyType_[] _PropertyName_ #endregion ) { var ui = new _UIViewNamespace_.LayoutView(); #region _LayoutViewHelperStatements_ for (int i = 0; i < _PropertyName_.Length; i++) { var child = _PropertyName_[i]; if (child == null) { continue; } var subChildren = Spreader <_PropertyType_> .ExtractChildren(child); if (subChildren != null) { for (int j = 0; j < subChildren.Length; j++) { ui._PropertyName_.Add(subChildren[j] /*_AccessUI_*/); } } else { ui._PropertyName_.Add(child /*_AccessUI_*/); } } #endregion return(_MarkupNamespace_.LayoutView.StartChain(ui)); }
public static LayoutView[] LayoutViewWithStructChildren( #region _LayoutViewStructHelperParameters_ params _PropertyType_[][] _PropertyName_ #endregion ) { var ui = new _UIViewNamespace_.LayoutView(); #region _LayoutViewStructHelperStatements_ for (int i = 0; i < _PropertyName_.Length; i++) { for (int j = 0; j < _PropertyName_[i].Length; j++) { ui._PropertyName_.Add(_PropertyName_[i][j] /*_AccessUI_*/); } } #endregion return(new LayoutView[] { _MarkupNamespace_.LayoutView.StartChain(ui) }); }