I am having trouble displaying the BusyIndicator in my project. Here's my XAML:
<?
xml
version
=
"1.0"
encoding
=
"UTF-8"
?>
<
ContentPage
xmlns
=
"http://xamarin.com/schemas/2014/forms"
xmlns:telerikListView
=
"clr-namespace:Telerik.XamarinForms.DataControls.ListView;assembly=Telerik.XamarinForms.DataControls"
xmlns:telerikDataControls
=
"clr-namespace:Telerik.XamarinForms.DataControls;assembly=Telerik.XamarinForms.DataControls"
xmlns:iconize
=
"clr-namespace:FormsPlugin.Iconize;assembly=FormsPlugin.Iconize"
xmlns:upTimeMobile
=
"clr-namespace:UpTimeMobile;assembly=UpTimeMobile.Android"
xmlns:lc
=
"clr-namespace:XLabs.Forms.Controls;assembly=XLabs.Forms"
xmlns:lb
=
"clr-namespace:XLabs.Forms.Behaviors;assembly=XLabs.Forms"
xmlns:lcon
=
"clr-namespace:XLabs.Forms.Converter;assembly=XLabs.Forms"
xmlns:lp
=
"clr-namespace:XLabs.Forms.Pages;assembly=XLabs.Forms"
xmlns:telerikBusyIndicator
=
"clr-namespace:Telerik.XamarinForms.Primitives;assembly=Telerik.XamarinForms.Primitives"
xmlns:sys
=
"clr-namespace:System;assembly=mscorlib"
x:Class
=
"MyApp.Views.Details"
>
<
telerikBusyIndicator:RadBusyIndicator
x:Name
=
"BusyIndicator"
AnimationType
=
"Animation6"
AnimationContentColor
=
"DodgerBlue"
AnimationContentHeightRequest
=
"100"
AnimationContentWidthRequest
=
"100"
IsBusy
=
"True"
>
<
telerikBusyIndicator:RadBusyIndicator.Content
>
<!-- Radlist goes here... -->
</
telerikBusyIndicator:RadBusyIndicator.Content
>
</
telerikBusyIndicator:RadBusyIndicator
>
</
ContentPage
>
This works, and the busy animation appears on the screen. However, if I try to set the indicator to false, the busy indicator doesn't appear at all when the content page is loading. Here's my code:
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class Details : ContentPage
{
public Details(Guid Id, string name)
{
InitializeComponent();
BusyIndicator.IsBusy = true;
DoLoad();
BusyIndicator.IsBusy = false;
}
private void DoLoad()
{
// do data load here...
ListViewDetails.ItemsSource = results;
}
}
I also tried using async like this (but still doesn't work):
private async void DoLoad()
{
await Task.Run(() =>
{
// do data load here...
ListViewDetails.ItemsSource = results;
});
}
My Android project min version is 6.0 (23), target is 6.0 (23), compiled using 8.0. I'm using Telerik UI for Xamarin R3 2017 and I also have SkiaSharp.Views.Forms 1.59.2 installed.