我已经在Xamarin Cross Platform中创建了自定义条目控件。但是不知道为什么会出现例外。我在哪里做错?
这是我的代码
fustomentry.cs
public class CustomEntry : Entry
{
public static readonly BindableProperty cornerRadiusProperty = BindableProperty.Create("Radius",typeof(double),typeof(CustomEntry),0);
public double CornerRadius {
get { return (double)GetValue(cornerRadiusProperty);}
set { SetValue(cornerRadiusProperty, value); }
}
}
myxaml页
<?xml version="1.0" encoding="UTF-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:cl="clr-namespace:customcontrolapp;assembly=customcontrolapp" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="customcontrolapp.MyXaml" >
<ContentPage.Content>
<cl:CustomEntry Text="Sample" />
</ContentPage.Content>
</ContentPage>
我已经解决了此异常更改链接选项链接全部仅链接到SDK链接。谢谢