我正在使用Xamarin.Forms构建应用程序,并且在制作XAML页面时出现以下错误:
The property "Class" does not exist in the "http://schemas.microsoft.com/winfx/2009/xaml" namespace.
这不是我做的第一页,除此以外,其他所有页面似乎都可以正常工作。我已经检查了引用和所述文件的属性,它们看起来都不错。
这是我的代码:
<?xml version="1.0" encoding="utf-8" ?>
<controls:ViewPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="XXXX"
xmlns:controls="XXXX"
</controls:ViewPage>
后面的代码如下:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using XXXX;
using Xamarin.Forms;
namespace XXXX
{
public partial class ActOverviewView : ViewPage, IActOverviewView
{
public ActOverviewView()
{
InitializeComponent();
}
}
}
我正在使用Visual Studio 2015
最佳答案
应该:
<?xml version="1.0" encoding="utf-8" ?>
<controls:ViewPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="XXXX.ActOverviewView"
xmlns:controls="XXXX"
</controls:ViewPage>
关于visual-studio - "Class" namespace 中不存在 "http://schemas.microsoft.com/winfx/2009/xaml"属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42412493/