Telerik Forums
UI for Xamarin Forum
1 answer
123 views
I have  a RadListView inside RadTabView, from RadListView it navigates to a content page, when returning to the  RadTabView the memory increases. can you please tell me why the memory increases when returning to the RadListView inside the RadTabView
Yana
Telerik team
 answered on 27 Jul 2022
1 answer
104 views
0 answers
100 views

Hello,

I have an issue regarding the Load on Demand behavior of the Telerik ListView for Xamarin. First i will explain how i defined my ListView and how it should work. The ListView was defined as follows:

            <telerikDataControls:RadListView
                ItemsSource="{Binding MyTickets}"
                SelectedItem="{Binding SelectedTicket, Mode=TwoWay}"
                SelectionMode="Single"
                HeaderTemplate="{StaticResource HeaderTemplate}" 
                FooterTemplate="{StaticResource FooterTemplate}"
                Grid.Row="3"
                IsLoadOnDemandEnabled="True"
                LoadOnDemandMode="Automatic">
                <telerikDataControls:RadListView.Behaviors>
                    <prism:EventToCommandBehavior
                        Command="{Binding ItemTappedCommand}"
                        EventName="ItemTapped" />
                    </telerikDataControls:RadListView.Behaviors>
                <telerikDataControls:RadListView.Commands>
                    <telerikListViewCommands:ListViewUserCommand 
                        Id="LoadOnDemand"                         
                        Command="{Binding LoadItemsCommand}" />
                </telerikDataControls:RadListView.Commands>
                <telerikDataControls:RadListView.ItemTemplate>
                                        ...
                 </telerikDataControls:RadListView.ItemTemplate>
             </telerikDataControls:RadListView>

I have left out the ItemTemplate since it is not relevant for the problem.

As you can see we use the LoadOnDemandMode Automatic for this ListView to load the Data. When the LoadOnDemand event is triggered we load the data with the LoadItemsCommand. The LoadItemsCommand loads 10 elements at a time which functions as lazy loading. The Telerik ListView default value for the MaxRemainingItems is 10. The problem now is that the LoadItemsCommand is triggered twice when opening the page since only 10 elements are loaded each time. We would like to only load 10 elements each time and if the user scrolls down we want to load the next 10 elements.

To solve this problem we tried creating a custom renderer for the ListView and change the value of MaxRemainingItems. We were able to change the value of MaxRemainingItems in the custom renderer but after doing so our LoadItemsCommand was never triggered when the user was scrolling through the ListView. The custom renderer and Listview were tested for Android. I hope you can help us resolve this issue.

We are using Telerik.UI.for.Xamarin Nuget-Package Version 2022.1.1.

Thank you in advance.

 

 

 

 

Marco
Top achievements
Rank 1
 asked on 02 May 2022
5 answers
325 views

Hey guys, 

I am currently implementing a grouping in my Listview. The data is getting grouped by a Datetimevalue.

I can sort the Listview by using this Datetime but then I get the long Datetimevalue inside the header I tryed using stringformat and a valueconverter but without any effect.

Is there a way to modify the output in the groupingheader?

Best regards

Julian

Lance | Senior Manager Technical Support
Telerik team
 updated answer on 07 Apr 2022
1 answer
411 views

Dear brothers and sisters:

Please help me

There are two stacklayouts in my page. I use radsegmentedcontrol to control their isvisible attribute when switching. When switching, I add a piece of data to the radlistview in stacklayout. When I switch for the first time, I can add data and display it, but when switching for the second time, the data is added into itemssource, and the front page does not display new data

Here is my code,Attached is my video

<?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" 
             xmlns:telerikDataControls="clr-namespace:Telerik.XamarinForms.DataControls;assembly=Telerik.XamarinForms.DataControls" 
             xmlns:telerikListView="clr-namespace:Telerik.XamarinForms.DataControls.ListView;assembly=Telerik.XamarinForms.DataControls" xmlns:local="clr-namespace:LogbotWMSApps.ViewModel" xmlns:telerikPrimitives="clr-namespace:Telerik.XamarinForms.Primitives;assembly=Telerik.XamarinForms.Primitives"
             x:Class="LogbotWMSApps.Views.AssignTasksPage">

    <ContentPage.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="../Themes/AssignTasksStyles.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </ContentPage.Resources>


    <ContentPage.Content>
        <StackLayout>
            <telerikInput:RadSegmentedControl x:Name="segmentControlText"
                              HeightRequest="40"
                              VerticalOptions="Start" SelectedIndex="0" SegmentBackgroundColor="AliceBlue" SelectedSegmentBackgroundColor="DodgerBlue" SelectionChanged="segmentControlText_SelectionChanged">
                <telerikInput:RadSegmentedControl.ItemsSource>
                    <x:Array Type="{x:Type x:String}">
                        <x:String>Group1</x:String>
                        <x:String>Group2</x:String>
                    </x:Array>
                </telerikInput:RadSegmentedControl.ItemsSource>
            </telerikInput:RadSegmentedControl>

            <StackLayout x:Name="FirstStackLayout" IsVisible="true">

                <StackLayout>
                <telerikDataControls:RadListView x:Name="listView" ItemsSource="{Binding Source}" SelectionChanged="listView_SelectionChanged">
                    <telerikDataControls:RadListView.BindingContext>
                        <local:AssignTaskModel />
                    </telerikDataControls:RadListView.BindingContext>
                    <telerikDataControls:RadListView.ItemTemplate>
                        <DataTemplate>
                            <telerikListView:ListViewTemplateCell>
                                <telerikListView:ListViewTemplateCell.View>
                                    <Grid BackgroundColor="AliceBlue" Margin="0,1">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="5*"></ColumnDefinition>
                                            <ColumnDefinition Width="5*"></ColumnDefinition>
                                        </Grid.ColumnDefinitions>
                                        <Label Margin="20,10" Text="{Binding TaskType}" />
                                        <Label Grid.Column="1" Margin="10" Text="{Binding TaskCode}" />
                                    </Grid>
                                </telerikListView:ListViewTemplateCell.View>
                            </telerikListView:ListViewTemplateCell>
                        </DataTemplate>
                    </telerikDataControls:RadListView.ItemTemplate>
                </telerikDataControls:RadListView>
                </StackLayout>
                
            </StackLayout>
            <StackLayout x:Name="SecondStackLayout" IsVisible="false">
                
                <StackLayout>
                    <telerikDataControls:RadListView x:Name="RecordListView" ItemsSource="{Binding AssignTaskRecords}" SelectionChanged="RecordListView_SelectionChanged">
                        <telerikDataControls:RadListView.BindingContext>
                            <local:TaskDistributionRecord />
                        </telerikDataControls:RadListView.BindingContext>
                        <telerikDataControls:RadListView.ItemTemplate>
                            <DataTemplate>
                                <telerikListView:ListViewTemplateCell>
                                    <telerikListView:ListViewTemplateCell.View>
                                        <Grid BackgroundColor="AliceBlue" Margin="0,1">
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="5*"></ColumnDefinition>
                                                <ColumnDefinition Width="5*"></ColumnDefinition>
                                            </Grid.ColumnDefinitions>
                                            <Label Margin="20,10" Text="{Binding TaskType}" />
                                            <Label Grid.Column="1" Margin="10" Text="{Binding TaskCode}" />
                                        </Grid>
                                    </telerikListView:ListViewTemplateCell.View>
                                </telerikListView:ListViewTemplateCell>
                            </DataTemplate>
                        </telerikDataControls:RadListView.ItemTemplate>
                    </telerikDataControls:RadListView>
                </StackLayout>
            </StackLayout>
        </StackLayout>
    </ContentPage.Content>
</ContentPage>

 

 

Didi
Telerik team
 answered on 11 Mar 2022
0 answers
114 views

I just put one telerikDataControls:RadListView in my page,No data source is set.But when I run the project, it prompts me for an error

Here is a screenshot of my code

 

Any help would be greatly appreciated.

 

 

盼宇
Top achievements
Rank 1
Iron
 asked on 04 Mar 2022
2 answers
168 views

Hi Support,

I have a UWP application with a a listview and inside the listview, I have a viewcell, then a grid with 3 columns. The 1st column is a RadNumericInput, 2nd is a string, 3rd is a comboBox. When I click on the + or - button in the RadNumericInput for a row, the value of the NumericInput updates correctly but the row I am working on is NOT selected in the listview as selectedItem. However if I click on the value box of NumericInput, the row is set as the selecteditem in the listview. Is there a way to add code to trigger the listview to select the row when the +/- button is clicked?

I tried the comboBox and the row is selected properly when I select a value inside the comboBox.

Please advise.

Vivian

 

Vivian
Top achievements
Rank 1
Iron
 answered on 20 Jan 2022
1 answer
149 views

We had a Xamarin 3 iOS application built using Telerik 2018 components and it was working fine until the recent update in iOS. However, after the iOS update to 15, Xamarin 3 iOS app started crashing. Then we updated our app to Xamarin 5 and were able to successfully compile and run it on an iOS 15 simulator. But the Telerik 2018 controls did not render on screen. So we upgraded Telerik control to 2021 version (trial), and now we are having following error which broke the compilation of the entire project.

you must add a reference to assembly 'netstandard version=2.0.0.0 xamarin

It seems that Telerik 2021 controls have a dependency on netstandard library which is either not supported or cannot be installed from NuGet. 

It would be great if you could help us to resolve this issue. This way we would recover our app from crashes, and purchase the latest updates for Telerik.

Didi
Telerik team
 answered on 06 Dec 2021
1 answer
220 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
0 answers
197 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
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?