[英]Why am I getting this error after upgrading to Xamarin Forms 2.0?
For context, I am creating an activity indicator in Xamarin Forms that brings up a new transparent page so it blocks user interaction. 对于上下文,我正在Xamarin Forms中创建一个活动指示器,该指示器会弹出一个新的透明页面,从而阻止用户交互。
Anyway, 无论如何,
Everything is fine with Xamarin Forms 1.3, but when I upgrade to XF 2.0, I'm getting this issue. Xamarin Forms 1.3一切都很好,但是当我升级到XF 2.0时,我遇到了这个问题。
Here is my code behind for the Xaml 这是Xaml的代码
ModalSpinnerPage ModalSpinnerPage
From the auto generated class, It looks like Xamarin thinks my ModalSpinnerPage is a member of Xamarin Forms (although its clearly not) 从自动生成的类中,看起来Xamarin认为我的ModalSpinnerPage是Xamarin Forms的成员(尽管显然不是)
Again, my problem is that after the Xamarin forms upgrade, Xamarin thinks my ModalSpinnerPage is a member of Xamarin Forms. 同样,我的问题是Xamarin表单升级后,Xamarin认为我的ModalSpinnerPage是Xamarin Forms的成员。 Everything is fine before the upgrade though.
升级之前一切都很好。 Any help on this would be awesome.
任何帮助都会很棒。 Thanks
谢谢
You need to add correct namespaces: 您需要添加正确的名称空间:
<sp:ModalSpinnerClass xmlns:sp="clr-namespace:XSpinner.FormsPlugin;assembly=XSpinner.PutHereCorrectAssemblyPath" /* the rest of properties */>
</sp:ModalSpinnerClass>
Here it's working example (using custom pages as a base): link 这是工作示例(使用自定义页面作为基础): 链接
The following code can work: 以下代码可以工作:
<ModelSpinner:ModelSpinnerPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:ModelSpinner="clr-namespace:XSpinner.FormsPlugin"
x:Class="XSpinner.FormsPlugin.ModelPageSpinner">
</ModelSpinner>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.