属性 "Class" 在 "http://schemas.microsoft.com/winfx/2009/xaml" 命名空间中不存在



我正在使用xamarin.forms构建一个应用程序,在制作XAML页面时,我会收到以下错误:

属性"类"不存在 " http://schemas.microsoft.com/winfx/2009/xaml"名称空间。

这不是我制作的第一页,除此之外,所有其他页面似乎都很好。我已经检查了所述文件的参考和属性,它们都很好。

这是我的代码:

<?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>

相关内容

最新更新