本文介绍了Xamarin表格.动态加载页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Xamarin表格.如何从字符串(xaml)动态加载内容页面?不要创建很多相似的页面.

Xamarin forms.How to dynamically load a content page from a string (xaml)? Not to create a lot of similar pages.

推荐答案

Xamarin表单具有视图和页面.页面略有不同,但是此示例具有一个类,该类将从XAML字符串作为UI加载UI.您也可以尝试从Page加载.

Xamarin Forms have Views, and Pages. Pages are a little different, but this sample has a class that loads UI from a XAML string as a ContentView. You can try loading from a Page as well.

  • 只需克隆此存储库
  • 运行示例(Android/UWP已通过测试很好)
  • 点击动态渲染"标签
  • 点击渲染"(并使用XAML播放)
  • Just clone this repo
  • Run the sample (Android/UWP have been testedwell)
  • Click on the Dynamic Rendering tab
  • Hit Render (and have a play with the XAML)

https://github.com/MelbourneDeveloper/Adapt.Presentation.git

这篇关于Xamarin表格.动态加载页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-15 04:49