我使用telerik控件开始了我的Xamarin项目,由于某些原因,当我在android模拟器上部署应用程序时,它显示了一个空白的屏幕,请注意,我已经从我一步一步跟踪的Telerik演示示例中获取的Xaml代码直到我将这些控件应用到我的应用程序中。 所有的参考资料都按照例子。 看下面我的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:telerikPrimitives="clr-namespace:Telerik.XamarinForms.Primitives;assembly=Telerik.XamarinForms.Primitives" xmlns:telerik="clr-namespace:Telerik.XamarinForms.DataControls;assembly=Telerik.XamarinForms.DataControls" xmlns:local="clr-namespace:PRPClockingXamarin" x:Class="PRPClockingXamarin.Views.MainPage" xmlns:telerikDataControls="clr-namespace:Telerik.XamarinForms.DataControls;assembly=Telerik.XamarinForms.DataControls"> <ContentPage.ToolbarItems> <ToolbarItem Activated="OnToolbarButtonClick" Order="Primary" Priority="0" Text="Open SideDrawer"> <ToolbarItem.Icon> <OnPlatform x:TypeArguments="FileImageSource" iOS="hamburgerButtonIcon.png" Android="hamburgerButtonIcon.png" WinPhone="Assets/hamburgerButtonIcon.png" /> </ToolbarItem.Icon> </ToolbarItem> </ContentPage.ToolbarItems> <Grid> <telerikPrimitives:RadSideDrawer x:Name="drawer" DrawerLength="250"> <telerikPrimitives:RadSideDrawer.MainContent> <Grid BackgroundColor="Gray"> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/> <RowDefinition Height="*"/> </Grid.RowDefinitions> <Label Text="Transition Type:"/> <Picker Grid.Row="1" x:Name="picker" SelectedIndexChanged="picker_SelectedIndexChanged"> <Picker.Items> <x:String>Push</x:String> <x:String>Reveal</x:String> <x:String>ReverseSlideOut</x:String> <x:String>ScaleUp</x:String> <x:String>SlideAlong</x:String> <x:String>SlideInOnTop</x:String> </Picker.Items> </Picker> <Label Grid.Row="2" x:Name="descritpionLabel"> </Label> <Button Text="Open SideDrawer" IsVisible="false" x:Name="button1"/> </Grid> </telerikPrimitives:RadSideDrawer.MainContent> <telerikPrimitives:RadSideDrawer.DrawerContent> <Grid BackgroundColor="#826182" WidthRequest="220"> <ListView x:Name="drawerList" /> </Grid> </telerikPrimitives:RadSideDrawer.DrawerContent> </telerikPrimitives:RadSideDrawer> </Grid> </ContentPage>I've started my Xamarin project using telerik controls, for some reason when I deploy the app on android simulator it shows a blank screen mind you that the Xaml code I've taken from a Telerik demo example that I followed step by step and it works perfectly up until I applied those controls into my App. All References are there as per example. See below my xaml page.
<?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:telerikPrimitives="clr-namespace:Telerik.XamarinForms.Primitives;assembly=Telerik.XamarinForms.Primitives" xmlns:telerik="clr-namespace:Telerik.XamarinForms.DataControls;assembly=Telerik.XamarinForms.DataControls" xmlns:local="clr-namespace:PRPClockingXamarin" x:Class="PRPClockingXamarin.Views.MainPage" xmlns:telerikDataControls="clr-namespace:Telerik.XamarinForms.DataControls;assembly=Telerik.XamarinForms.DataControls"> <ContentPage.ToolbarItems> <ToolbarItem Activated="OnToolbarButtonClick" Order="Primary" Priority="0" Text="Open SideDrawer"> <ToolbarItem.Icon> <OnPlatform x:TypeArguments="FileImageSource" iOS="hamburgerButtonIcon.png" Android="hamburgerButtonIcon.png" WinPhone="Assets/hamburgerButtonIcon.png" /> </ToolbarItem.Icon> </ToolbarItem> </ContentPage.ToolbarItems> <Grid> <telerikPrimitives:RadSideDrawer x:Name="drawer" DrawerLength="250"> <telerikPrimitives:RadSideDrawer.MainContent> <Grid BackgroundColor="Gray"> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/> <RowDefinition Height="*"/> </Grid.RowDefinitions> <Label Text="Transition Type:"/> <Picker Grid.Row="1" x:Name="picker" SelectedIndexChanged="picker_SelectedIndexChanged"> <Picker.Items> <x:String>Push</x:String> <x:String>Reveal</x:String> <x:String>ReverseSlideOut</x:String> <x:String>ScaleUp</x:String> <x:String>SlideAlong</x:String> <x:String>SlideInOnTop</x:String> </Picker.Items> </Picker> <Label Grid.Row="2" x:Name="descritpionLabel"> </Label> <Button Text="Open SideDrawer" IsVisible="false" x:Name="button1"/> </Grid> </telerikPrimitives:RadSideDrawer.MainContent> <telerikPrimitives:RadSideDrawer.DrawerContent> <Grid BackgroundColor="#826182" WidthRequest="220"> <ListView x:Name="drawerList" /> </Grid> </telerikPrimitives:RadSideDrawer.DrawerContent> </telerikPrimitives:RadSideDrawer> </Grid> </ContentPage>最满意答案
我从Telerik发现了上述问题的解决方案: -
这种行为的原因不是注册控件的渲染器或丢失RenderScript nuget包。
I found a solution on the above issue from Telerik : -
reason for such behavior would be not registering the control's Renderer or missing the RenderScript nuget package.
更多推荐
Telerik,xmlns,电脑培训,计算机培训,IT培训"/> <meta name="description&quo
发布评论