Xamarin.forms 内容页不显示
我正在尝试创建一个自定义键盘,下面是视图的xaml,在所有配置之后,它显示一个空白页面Xamarin.forms 内容页不显示,xamarin.forms,Xamarin.forms,我正在尝试创建一个自定义键盘,下面是视图的xaml,在所有配置之后,它显示一个空白页面 <ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:local="clr-namespace:CustomKeyboard" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="Cu
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:local="clr-namespace:CustomKeyboard" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="CustomKeyboard.MainPage" Title="Custom Keyboard App" BackgroundColor="White">
<ScrollView>
<Grid Padding="15">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Entry Grid.Row="0" HorizontalOptions="FillAndExpand" VerticalOptions="Start" Placeholder="Regular entry..." />
<StackLayout Grid.Row="1" Orientation="Vertical">
<local:EntryWithCustomKeyboard x:Name="entry1" HorizontalOptions="FillAndExpand" Margin="0, 0, 0, 20" Keyboard="Text" TextColor="Black" Placeholder="Custom Keyboard entry..." />
<local:EntryWithCustomKeyboard x:Name="entry2" HorizontalOptions="FillAndExpand" Keyboard="Text" TextColor="Black" Placeholder="Custom Keyboard entry 2..." />
</StackLayout>
<BoxView Grid.Row="2" />
</Grid>
</ScrollView>
</ContentPage>
您是否尝试将带有文本的标签添加到布局中以验证其是否显示?我不知道什么是EntryWithCustomKeyboard
,因此问题可能在该类内部。感谢您能够修复该问题,问题的原因是xml上内容页的命名空间,它与呈现器类命名空间不匹配