xamarin形成了内容页面和内容视图的区别 [英] xamarin forms what is the difference content page and content view

查看:392
本文介绍了xamarin形成了内容页面和内容视图的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

两者之间有什么区别

  • 内容页面
  • contentpage.content
  • 内容视图?

我想做的是在点按某个项目时让一些内容覆盖主要内容.我当时想我可以将所有内容都放在同一个XMAL文件中,并根据按钮的状态使其可见或不可见.还是将它们拆分成单独的文件会更好?

What I'm trying to do is to have some content that overlays the main content when an item is being tapped. I was thinking I could have all the content on in the same XMAL file and just make it visible or not depending on the button state. Or would it be better to split them into separate files?

推荐答案

ContentPage是旨在填充显示内容的Page. ContentViewView,可以包含在Page或另一个View中.两者都具有包含子内容的Content属性-单个View,或更常见的是Layout包含多个Views.

A ContentPage is a Page that is intended to fill the display. A ContentView is a View that can be contained within a Page or within another View. Both have a Content property that contains child content - either a single View, or more commonly a Layout containing multiple Views.

这篇关于xamarin形成了内容页面和内容视图的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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