Telerik Forums
UI for Xamarin Forum
1 answer
132 views

Is it possible to programatically create charts in Xamarin Forms?

In particular I want to create a bar chart that has between 1-30 data groups and in each group there can be up to 8 items.

e.g. The X axis could show classrooms (1-30), for each class room there are 1-8 timeslots, and the numeric Y axis would show student numbers.

Doing this in xaml is possible but messy. I had a quick look but couldnt see how to set up the series programtically.

 

Is this  possible and if so can you supply an example please.

Thanks

Nikola
Telerik team
 answered on 27 Oct 2021
1 answer
277 views

I have added swipe in RadListView, but the swipe functionality is not working, it is swiping only when swiped from left or right edges.

Following is the code I have used

<telerikDataControls:RadListView
                                 IsItemSwipeEnabled="True"
                                 ItemsSource="{Binding FinalDisplayCallSheets}"
                                 SelectionMode="None"
                                 SwipeOffset="0, 0, 70, 0"
                                 SwipeThreshold="10">
<telerikDataControls:RadListView.HeaderTemplate>
<DataTemplate>
<Grid ColumnSpacing="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.8*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="0.25*"/>
<ColumnDefinition Width="0.25*"/>
<ColumnDefinition Width="0.25*"/>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="0.3*"/>
</Grid.ColumnDefinitions>
<Frame HasShadow="False" Padding="0" CornerRadius="0" BackgroundColor="{StaticResource GridBackgroundColor}" BorderColor="{StaticResource GridBorderColor}">
<Label Text="Task" TextColor="{StaticResource DarkBlueColor}"  Margin="8" VerticalOptions="Center" FontSize="14" FontAttributes="Bold" />
</Frame>
<Frame HasShadow="False" Grid.Column="1" Padding="0" CornerRadius="0" BackgroundColor="{StaticResource GridBackgroundColor}" BorderColor="{StaticResource GridBorderColor}">
<Label Text="Supplier" TextColor="{StaticResource DarkBlueColor}"  Margin="8" VerticalOptions="Center" FontSize="14" FontAttributes="Bold"/>
</Frame>
<Frame HasShadow="False" Grid.Column="2" Padding="8" CornerRadius="0" BackgroundColor="{StaticResource GridBackgroundColor}" BorderColor="{StaticResource GridBorderColor}">
<StackLayout>
<Label Text="Call" TextColor="{StaticResource DarkBlueColor}"  VerticalOptions="Center" FontSize="14" FontAttributes="Bold" />
<Label Text="Plan" TextColor="{StaticResource DarkBlueColor}"   VerticalOptions="Center" FontSize="14" FontAttributes="Bold" />
</StackLayout>
</Frame>
<Frame HasShadow="False" Grid.Column="3" Padding="8" CornerRadius="0" BackgroundColor="{StaticResource GridBackgroundColor}" BorderColor="{StaticResource GridBorderColor}">
<StackLayout>
<Label Text="Start" TextColor="{StaticResource DarkBlueColor}"  VerticalOptions="Center" FontSize="14" FontAttributes="Bold" />
<Label Text="Cmp" TextColor="{StaticResource DarkBlueColor}"  VerticalOptions="Center" FontSize="14" FontAttributes="Bold" />
</StackLayout>
</Frame>
<Frame HasShadow="False" Grid.Column="4" Padding="8" CornerRadius="0" BackgroundColor="{StaticResource GridBackgroundColor}" BorderColor="{StaticResource GridBorderColor}">
<StackLayout>
<Label Text="Est" TextColor="{StaticResource DarkBlueColor}"   VerticalOptions="Center" FontSize="14" FontAttributes="Bold" />
<Label Text="Base" TextColor="{StaticResource DarkBlueColor}"   VerticalOptions="Center" FontSize="14" FontAttributes="Bold" />
</StackLayout>
</Frame>
<Frame HasShadow="False" Grid.Column="5" Padding="0" CornerRadius="0" BackgroundColor="{StaticResource GridBackgroundColor}" BorderColor="{StaticResource GridBorderColor}">
<Label Text="Notes" TextColor="{StaticResource DarkBlueColor}"  Margin="8" VerticalOptions="Center" FontSize="14" FontAttributes="Bold" />
</Frame>
<Frame HasShadow="False" Grid.Column="6" Padding="0" CornerRadius="0" BackgroundColor="{StaticResource GridBackgroundColor}" BorderColor="{StaticResource GridBorderColor}">
<Label Text="Status" TextColor="{StaticResource DarkBlueColor}"  Margin="8" VerticalOptions="Center" FontSize="14" FontAttributes="Bold" />
</Frame>
</Grid>
</DataTemplate>
</telerikDataControls:RadListView.HeaderTemplate>
<telerikDataControls:RadListView.ItemTemplate>
<DataTemplate>
<telerikListView:ListViewTemplateCell>
<telerikListView:ListViewTemplateCell.View>
<Grid ColumnSpacing="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.8*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="0.25*"/>
<ColumnDefinition Width="0.25*"/>
<ColumnDefinition Width="0.25*"/>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="0.3*"/>
</Grid.ColumnDefinitions>
<Frame HasShadow="False" Padding="0" CornerRadius="0" BackgroundColor="White" BorderColor="{StaticResource GridBorderColor}">
<StackLayout Orientation="Horizontal">
<BoxView VerticalOptions="Fill" HorizontalOptions="Fill" WidthRequest="10" 
Color="{Binding LinkedColor}" Margin="0,0,0,0"/>
<Label Text="{Binding sgItemName}" TextColor="{Binding TaskTextColor}" LineBreakMode="WordWrap" Padding="8" VerticalOptions="Center"
   FontAttributes="Bold"/>
</StackLayout>
</Frame>
<Frame Grid.Column="1" HasShadow="False" Padding="0" CornerRadius="0" BackgroundColor="White" BorderColor="{StaticResource GridBorderColor}">
<Label Text="{Binding SupplierName}" TextColor="#878388" LineBreakMode="WordWrap" Padding="8" VerticalOptions="Center" />
</Frame>
<Frame Grid.Column="2" HasShadow="False" Padding="0" CornerRadius="0" BackgroundColor="White" BorderColor="{StaticResource GridBorderColor}">
<Grid Padding="8" VerticalOptions="Center">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Label Text="{Binding DateCalled}" Grid.Row="0" TextColor="{StaticResource PinkColor}"  />
<Label Text="{Binding DatePlanned}"  Grid.Row="1" TextColor="#4899cf"/>
</Grid>
</Frame>
<Frame Grid.Column="3" HasShadow="False" Padding="0" CornerRadius="0" BackgroundColor="White" BorderColor="{StaticResource GridBorderColor}">
<Grid Padding="8" VerticalOptions="Center">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Label Text="{Binding DateStart}" TextColor="#4899cf"  />
<Label Text="{Binding DateCompleted}"  Grid.Row="1" TextColor="#56b883"/>
</Grid>
</Frame>
<Frame Grid.Column="4" HasShadow="False" Padding="0" CornerRadius="0" BackgroundColor="White" BorderColor="{StaticResource GridBorderColor}">
<Grid Padding="8" VerticalOptions="Center">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Label Text="{Binding DateEstimatedStart}" Grid.Row="0" TextColor="{StaticResource PinkColor}"  />
<Label Text="{Binding DateBaselineCompletion}"  Grid.Row="1" TextColor="#4899cf"/>
</Grid>
</Frame>
<Frame Grid.Column="5" HasShadow="False" Padding="0" CornerRadius="0" BackgroundColor="White" BorderColor="{StaticResource GridBorderColor}">
<Grid VerticalOptions="Center" Padding="8">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Image Grid.Column="0" HorizontalOptions="Center" HeightRequest="24" WidthRequest="24" Source="Images/Document_Gray.png"/>
<Image Grid.Column="1" HorizontalOptions="Center" HeightRequest="24" WidthRequest="24" Source="Images/Truck_Gray.png"/>
<Image Grid.Column="2" HorizontalOptions="Center" HeightRequest="24" WidthRequest="24" Source="Images/Url.png"/>
<Image Grid.Column="3" HorizontalOptions="Center" HeightRequest="24" WidthRequest="24" Source="Images/Image_Gray.png"/>
</Grid>
</Frame>
<Frame Grid.Column="6" HasShadow="False" Padding="0" CornerRadius="0" BackgroundColor="White"
   BorderColor="{StaticResource GridBorderColor}">
<Image HorizontalOptions="Center" HeightRequest="30" WidthRequest="30"
                                               Source="{Binding Path=DataRow[StatIcon], 
                                                Converter={StaticResource csImageConv}}">
<Image.GestureRecognizers>
<TapGestureRecognizer NumberOfTapsRequired="1" Command="{Binding Path=BindingContext.TaskScheduleCommand, Source={x:Reference callSheet}}"
  CommandParameter="{Binding}"/>
</Image.GestureRecognizers>
</Image>
</Frame>
</Grid>

</telerikListView:ListViewTemplateCell.View>
</telerikListView:ListViewTemplateCell>

</DataTemplate>
</telerikDataControls:RadListView.ItemTemplate>
<telerikDataControls:RadListView.ItemSwipeContentTemplate>
<DataTemplate>
<Grid Margin="0" Padding="0" ColumnSpacing="0" RowSpacing="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="70" />
</Grid.ColumnDefinitions>
<Label Grid.Column="1"  BackgroundColor="Red" HorizontalTextAlignment="Center" Text="delete" TextColor="White"
                       VerticalTextAlignment="Center"
                       WidthRequest="70" />
</Grid>
</DataTemplate>
</telerikDataControls:RadListView.ItemSwipeContentTemplate>
</telerikDataControls:RadListView>
Yana
Telerik team
 answered on 26 Oct 2021
1 answer
129 views
Hi, I'm having a problem causing the App in Android Tablet become unresponsive when the a Graph rendering which has 5 series and each series contains more than 5000 data points. May I know the main cause of this and is there a  limit with data points?
Didi
Telerik team
 answered on 25 Oct 2021
1 answer
3.1K+ views

Since adding the Telerik date picker control - we are getting an intermittent error:

 

System.ObjectDisposedException: Cannot access a disposed object. Object name: 'Android.Widget.PopupWindow'.

 

Call Stack below:

 

JniPeerMembers.AssertSelf (Java.Interop.IJavaPeerable self)
JniPeerMembers+JniInstanceMethods.InvokeVirtualVoidMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters)
PopupWindow.set_ContentView (Android.Views.View value)
RadPopup.ClearAndroidContext ()
RadPopup.UpdatePopupContext ()
RadPopup.OnPlacementTargetRendererChanged ()
PopupBase.PlacementTarget_PropertyChanged (System.Object sender, System.ComponentModel.PropertyChangedEventArgs e)
PopupBase+<>c.<AttachWeakEventListenerForPlacementTargetPropertyChanged>b__99_0 (Telerik.XamarinForms.Primitives.PopupBase listener, System.Object sender, System.ComponentModel.PropertyChangedEventArgs eventArgs)
WeakEventListener`3[TListener,TEventSource,TEventArgs].OnEvent (System.Object sender, TEventArgs eventArgs)
(wrapper delegate-invoke) <Module>.invoke_void_object_PropertyChangedEventArgs(object,System.ComponentModel.PropertyChangedEventArgs)
BindableObject.OnPropertyChanged (System.String propertyName)
Element.OnPropertyChanged (System.String propertyName)
BindableObject.ClearValue (Xamarin.Forms.BindableProperty property, System.Boolean fromStyle, System.Boolean checkAccess)
BindableObject.ClearValue (Xamarin.Forms.BindableProperty property)
Platform+<>c__DisplayClass45_0.<Cleanup>g__DoCleanup|0 ()
Platform.Cleanup (System.Collections.Generic.List`1[T] viewsToRemove, System.Collections.Generic.List`1[T] renderersToDispose)
Platform.SetPage (Xamarin.Forms.Page newRoot)
Platform.Dispose ()
FormsAppCompatActivity.OnDestroy ()
Activity.n_OnDestroy (System.IntPtr jnienv, System.IntPtr native__this)
(wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.8(intptr,intptr)

 

This is within the dispose method of what I assume is the telerik control. 

 

<?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:telerikInput="clr-namespace:Telerik.XamarinForms.Input;assembly=Telerik.XamarinForms.Input"
             x:Class="MobileInterface.Views.QuestionText"
             Shell.PresentationMode="ModalNotAnimated">
    <ContentPage.Content>
        <StackLayout>
            <StackLayout Grid.Row="1" Grid.Column="2" Orientation="Horizontal"
                         VerticalOptions="Start" HorizontalOptions="FillAndExpand"
                         BackgroundColor="{StaticResource Primary}" Padding="10"
                         >
                <Label Text="{Binding LocationTitle}"
                       FontSize="Small"
                       HorizontalTextAlignment="Start" Grid.Column="1"
                       HorizontalOptions="FillAndExpand"
                       TextColor="White"/>
                <Label Text="{Binding Title}"
                       FontSize="Small"
                       HorizontalTextAlignment="End" Grid.Column="2"
                       HorizontalOptions="FillAndExpand"
                       TextColor="White"
                   />
            </StackLayout>
            <Label Text="{Binding QuestionText}"
                   VerticalOptions="Center" 
                   HorizontalOptions="CenterAndExpand"
                   FontSize="Medium"                   
                   Margin="10"/>
            <Entry x:Name="dataEntry"  Text="{Binding Answer, Mode=TwoWay}" 
                   FontSize="{Binding FontSize}" 
                   VerticalOptions="CenterAndExpand" HorizontalOptions="FillAndExpand" 
                   IsVisible="{Binding IsTextType}}"
                   Keyboard="{Binding KeyboardType}"
                   Completed="dataEntry_Completed"
                   Focused="dataEntry_Focused"
                   Margin="10"/>
            <telerikInput:RadDateTimePicker
                x:Name="datePicker"
                Date="{Binding DateAnswer}"
                DefaultHighlightedDate="{Binding DateDefaultHightlight}"
                VerticalOptions="CenterAndExpand" HorizontalOptions="FillAndExpand"
                DisplayStringFormat="d"
                SpinnerFormat="d"
                SelectionChanged="RadDateTimePicker_SelectionChanged"
                IsVisible="{Binding IsDateType}">
                <telerikInput:RadDateTimePicker.SelectorSettings>
                    <telerikInput:PickerPopupSelectorSettings>
                        <telerikInput:PickerPopupSelectorSettings.AcceptButtonStyle>
                            <Style TargetType="Button">
                                <Setter Property="TextColor" Value="White"/>
                            </Style>
                        </telerikInput:PickerPopupSelectorSettings.AcceptButtonStyle>
                        <telerikInput:PickerPopupSelectorSettings.CancelButtonStyle>
                            <Style TargetType="Button">
                                <Setter Property="TextColor" Value="White"/>
                            </Style>
                        </telerikInput:PickerPopupSelectorSettings.CancelButtonStyle>
                    </telerikInput:PickerPopupSelectorSettings>
                </telerikInput:RadDateTimePicker.SelectorSettings>
            </telerikInput:RadDateTimePicker>            
            <Button Margin="0,10,0,0" Text="{Binding ButtonText}"
                        Clicked="Button_Clicked"                        
                        BackgroundColor="{StaticResource Primary}"
                        TextColor="White" />
        </StackLayout>
    </ContentPage.Content>
</ContentPage>

 

I'm not sure if the IsVisible is what's jamming me up - it's a generic page that either is text based but if the type is a date - I swap out which one is visible.

 

Any input or thoughts are appreciated on this type of error.  It appears that it's been a common one in the Xamarin history.

 

Xamarin Forms:  5.0.0.2125

Telerik.UI.for.Xamarin.Input 2021.3.915.1

(same for the DataControls)

Lance | Senior Manager Technical Support
Telerik team
 updated answer on 15 Oct 2021
1 answer
120 views

I want to learn xamarin.forms more has a problem I do not know how to use events, how what will happen when I click the button

Do you know any site that teaches you exactly how to use these events

 

Xamarin.Forms Android

Lance | Senior Manager Technical Support
Telerik team
 answered on 14 Oct 2021
1 answer
116 views

Hi there,

i  have a list of images inside my slides that i want to zoom and pan on.

But the swiping gesture gets recognized so fast that it fires before the zoom gesture can be performed.

Does anyone have an idea to do so or can show me a working example of image gallery with zooming and paning inside SlideView?

 

Thank you all and have a nice day.

Lance | Senior Manager Technical Support
Telerik team
 answered on 13 Oct 2021
0 answers
272 views

Hello,

I'm trying to evaluate the TagIt example. I have it working in a debug environment. It runs on all the simulators (Android and iOS). It runs in UWP as well.

However, when I run it on my iPhone it crashes consistently in the PickerPage view when I display my images. I have hundreds of images in my phone, but the code is only trying to show the first 100.

After the first page of images appears, I swipe up to show the next page, and the application exits. It looks like a crash.

I put unhandled exception handlers in the iOS application (according to this reference - global-error-handling-xamarin-forms). They are not hit, nor do they record any useful exception information. The output log shows no exceptions.

Output Log:

Resolved pending breakpoint at 'AppDelegate.cs:77,1' to void tagit.iOS.AppDelegate.LogUnhandledException (System.Exception exception) [0x00002].
Resolved pending breakpoint at 'AppDelegate.cs:101,1' to void tagit.iOS.AppDelegate.DisplayCrashReport () [0x00007].
Thread started: <Thread Pool> #3
Thread started: <Thread Pool> #4
Thread started: <Thread Pool> #5
Thread started: <Thread Pool> #6
2021-10-06 05:40:45.206 tagit.iOS[13433:3334804] WARNING: This app's CFBundleDevelopmentRegion is not a string value. This can lead to unexpected results at runtime. Please change CFBundleDevelopmentRegion in your Info.plist to a string value.

Thread started: <Thread Pool> #7
Thread started: <Thread Pool> #8
Thread started: <Thread Pool> #9
Thread started: <Thread Pool> #10
Thread started:  #11
Thread started: <Thread Pool> #12
Thread started: <Thread Pool> #13
Thread started: <Thread Pool> #14
Thread started: <Thread Pool> #15
2021-10-06 05:40:56.010 tagit.iOS[13433:3334909] A task was canceled.
System.Threading.Tasks.TaskCanceledException: A task was canceled.
  at FFImageLoading.Work.ImageLoaderTask`3[TDecoderContainer,TImageContainer,TImageView].Init () [0x00164] in <a159011f32534c8eb0455a9cf0bad5a7>:0

2021-10-06 05:40:56.012 tagit.iOS[13433:3335672] A task was canceled.
System.Threading.Tasks.TaskCanceledException: A task was canceled.
  at FFImageLoading.Work.ImageLoaderTask`3[TDecoderContainer,TImageContainer,TImageView].Init () [0x00164] in <a159011f32534c8eb0455a9cf0bad5a7>:0

2021-10-06 05:40:56.017 tagit.iOS[13433:3334837] A task was canceled.
System.Threading.Tasks.TaskCanceledException: A task was canceled.
  at FFImageLoading.Work.ImageLoaderTask`3[TDecoderContainer,TImageContainer,TImageView].Init () [0x00164] in <a159011f32534c8eb0455a9cf0bad5a7>:0

2021-10-06 05:40:56.019 tagit.iOS[13433:3334910] A task was canceled.
System.Threading.Tasks.TaskCanceledException: A task was canceled.
  at FFImageLoading.Work.ImageLoaderTask`3[TDecoderContainer,TImageContainer,TImageView].Init () [0x00164] in <a159011f32534c8eb0455a9cf0bad5a7>:0

2021-10-06 05:40:56.030 tagit.iOS[13433:3334910] A task was canceled.
System.Threading.Tasks.TaskCanceledException: A task was canceled.
  at FFImageLoading.Work.ImageLoaderTask`3[TDecoderContainer,TImageContainer,TImageView].Init () [0x00164] in <a159011f32534c8eb0455a9cf0bad5a7>:0

Thread started: <Thread Pool> #16
Thread started: <Thread Pool> #17
The app has been terminated.

Development Environment:

  • VS 2019 v 16.11.4
  • Telerik UI for Xamarin R2 2021
  • XCode 13
  • Xamarin Forms 5.0.0.2083

I installed the TagIt app from the App Store. It does the same thing.

Any help would be appreciated.

Robert
Top achievements
Rank 1
 asked on 06 Oct 2021
1 answer
132 views

Hi,

 

is there any way to check if the event added to the calendar was clicked? I can't see any on-click event listener or something like that.

 

#native #android

Didi
Telerik team
 answered on 04 Oct 2021
1 answer
139 views

Hello,

I'm using the RadMaskedInput for Xamarin but it seems to ignore the RegEx completely.

I even used the example RegEx from the docs (the date validation) but even that one always returns true even when it's obviously an incorrect value.

What am I missing here?

 

Kind regards

 

Yana
Telerik team
 answered on 04 Oct 2021
1 answer
116 views
Hi, does anyone know a good site to learn xamarin
Yana
Telerik team
 answered on 01 Oct 2021
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Krasimir
Top achievements
Rank 3
Iron
Iron
Iron
Shawn
Top achievements
Rank 1
Iron
Javier
Top achievements
Rank 1
Iron
Jean-François
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?