4
VS 2017中的Xamarin表单。最新的Xamarin表单。Xamarin.Forms XAML - 添加本地控件
关注此博客https://blog.xamarin.com/adding-bindable-native-views-directly-to-xaml/?utm_medium=social&utm_campaign=blog&utm_source=twitter&utm_content=xaml-bindable-native-views我在页面上添加了一个简单的Android TextBox,但没有出现。
我错过了什么吗?
<?xml version="1.0" encoding="utf-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:androidWidget="clr-namespace:Android.Widget;assembly=Mono.Android;targetPlatform=Android"
xmlns:formsandroid="clr-namespace:Xamarin.Forms;assembly=Xamarin.Forms.Platform.Android;targetPlatform=Android"
xmlns:controls="clr-namespace:ImageCircle.Forms.Plugin.Abstractions;assembly=ImageCircle.Forms.Plugin.Abstractions"
xmlns:widget="clr-namespace:Android.Support.Design.Widget;assembly=Xamarin.Android.Support.Design"
x:Class="Muffin.MainPage">
<StackLayout>
<androidWidget:TextView x:Arguments="{x:Static formsandroid:Forms.Context}" Text="this is the text" />
</StackLayout>
是'Content'声明''要求:
看到任何本地视图控件名称?对不起,我还没有机会真正挖掘Xamarin的任何东西,但它是一个比较突出的细节,因为其余部分看起来非常复制/粘贴。 –
一旦我禁用了XAMLC,它就起作用了。谢谢克里斯 –
啊甜蜜,很高兴知道未来!干杯 –