1

次のような独自のカスタム レンダラーを Xamarin で作成しました。

namespace TestApp
{
    public class CustomEntry : Entry
    {
        public CustomEntry ()
        {
        }
    }
}

これを HomePage.xaml ファイルに含めるにはどうすればよいですか? 私はこれを試しました:

<?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:local="clr-namespace:TestApp;assembly:TestApp" 
x:Class="TestApp.SubPage">
    <ContentPage.Content>
        <StackLayout>
            <local:CustomEntry></local:CustomEntry>
        </StackLayout>
    </ContentPage.Content>
</ContentPage>

しかし、 CustomEntry は " http://xamarin.com/schemas/2014/forms " 名前空間の有効なコントロールではないと言って、うまくいきませんでした。何か案は?

4

2 に答える 2