如何解决在Xamarin的xmlns中找不到类型Ellipse
在我的Xamarin应用程序中,我试图在xml中使用Ellipse
,但返回了错误:
在xmlns
http://xamarin.com/schemas/2014/forms
中找不到类型Ellipse
文档:https://docs.microsoft.com/en-us/xamarin/xamarin-forms/user-interface/shapes/ellipse
Page.xml
<?xml version="1.0" encoding="UTF-8"?>
<ContentPage
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Osma.Mobile.App.Views.Start" >
<ContentPage.Content>
<StackLayout>
<Ellipse Fill="Red"
WidthRequest="150"
HeightRequest="50"
HorizontalOptions="Start" />
</StackLayout>
</ContentPage.Content>
</ContentPage>
解决方法
您将必须在App.cs文件中设置标志
public App()
{
Device.SetFlags(new[] {"Shapes_Experimental","Brush_Experimental"});
InitializeComponent()
}
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。