xamarin 表单内容页面和内容视图有什么区别 [英] xamarin forms what is the difference content page and content view

查看:44
本文介绍了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?

推荐答案

A ContentPage 是用于填充显示的 Page.ContentView 是可以包含在 Page 或另一个 View 中的 View.两者都有一个包含子内容的 Content 属性 - 一个 View,或更常见的是包含多个 ViewLayout>.

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天全站免登陆