c# - 嵌入 Xamarin Forms 或 native 嵌入

标签 c# xamarin xamarin.forms

我将制作一个需要本地 map 的应用程序。要么我使用 Xamarin native 和 Embedding Xamarin.Forms in Xamarin Native 来制作应用程序在没有 map 页面的所有页面上。或者如果可能的话,我会做一个 Xamarin Forms 应用程序并嵌入 native map 控件(如果可能的话)?我读过Adding Platform-Specific Controls to a Xamarin.Forms Layout但 map 包含在内吗?或者只是“小”控件作为标签?

我应该使用什么?

最佳答案

原生嵌入很难实现(您基本上需要使用共享项目而不是 PCL),因此对于许多人来说,使用 CustomRenderers 更容易。

Xamarin.Forms Embedding 另一方面,仍然是预览版,看起来很容易使用,但说实话我不知道它给我们带来了什么优势。就像如果我们正在制作一个 native 应用程序,为什么我们需要将 xamarin.forms 加载到我们的项目中,它不仅会使我们的应用程序更大,而且会使其更难以遵循。

我从你的问题中看到的方式是使用 Xamarin.Forms here 给出的 map 。如果需要,您可以访问它的自定义渲染器。或者使用TKCustomMap他们已经扩展了 map

关于c# - 嵌入 Xamarin Forms 或 native 嵌入,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44417346/

相关文章:

c# - 无法从 Visual Studio 连接到 Mac 上的 Xamarin

c# - 错误 "Xamarin.Android.Support.Design 27.0.2.1 is not compatible with monoandroid60"

mobile - Xamarin WebView 请求桌面站点

c# - 将 Context 绑定(bind)到 ListView 不起作用

c# - 如何使对象数组对其他函数可见

c# - C# 中有什么方法可以在派生类中强制执行运算符重载吗?

c# - 企业库验证 - 允许空值但验证其他属性?

c# - 你会在长开关/枚举声明中使用区域吗?

c# - Xamarin for Android 中的 RestSharp 没有给出任何响应

c# - Xamarin 应用程序 Release模式下的 NullReferenceException