Telerik Forums
UI for Xamarin Forum
3 answers
281 views

I have the following RadListView:

 

<telerik:RadListView x:Name="PhaseListView" ItemsSource="{Binding Items}">
         <telerik:RadListView.GroupHeaderTemplate>
           <DataTemplate>
             <StackLayout>
                 <Label Text="{Binding}" TextColor="White" HorizontalOptions="Center"></Label>
             </StackLayout>
           </DataTemplate>
         </telerik:RadListView.GroupHeaderTemplate>
         <telerik:RadListView.ItemTemplate>
           <DataTemplate>
             <template:ListViewTemplateCell >
               <template:ListViewTemplateCell.View>
                 <StackLayout>
                   <StackLayout Orientation="Horizontal">
                     <Label Text="{Binding ID}"></Label>
                   </StackLayout>
                   <Slider Value="{Binding Complete}" IsEnabled="False" HorizontalOptions="FillAndExpand"></Slider>
                 </StackLayout>
               </template:ListViewTemplateCell.View>
             </template:ListViewTemplateCell>
           </DataTemplate>
         </telerik:RadListView.ItemTemplate>
         <telerik:RadListView.LayoutDefinition>
           <template:ListViewLinearLayout Orientation="Vertical"/>
         </telerik:RadListView.LayoutDefinition>
       </telerik:RadListView>

The grouping is done in the code behind via:

public partial class PhaseXaml : ContentPage
    {
        public RadListView PhaseList { get; private set; }
 
        public PhaseXaml()
        {
            InitializeComponent();
            PhaseList = PhaseListView; // So it can be accessed from viewmodel
 
            var lookup = new DelegateGroupDescriptor{KeyExtractor = new PhaseGrouping().GetKey};
            PhaseListView.GroupDescriptors.Add(lookup);
 
            BindingContext = new PhaseViewModel(new PhaseRepository(), this);
        }
 
        private class PhaseGrouping : IKeyLookup
        {
            public object GetKey(object item)
            {
                var phase = (Phase) item;
                return phase.ProjectName;
            }
        }

The ProjectName property is a string, now it does group the items correctly but the header text remains empty. When I break in the GetKey method I can see that at that point the ProjectName property does have a value. I have tried other string Properties on the phase object and it appears that while it groups correctly the header stays empty. If I bind it to say an int (Project id) that will be displayed in the header.
I have attempted to group with a PropertyGroupDescriptor as well but that has the same results. I'm testing on an Android device at the moment.

 So my question is is there a way to get string properties to display in the groupheader, and if not whether it's possible to bind the text of the header to another property than is used to group the item (that we can assume is same for all items in the group)

Elad
Top achievements
Rank 1
 answered on 07 Apr 2016
1 answer
177 views
I am doing some research on porting an old WPF app in a way that we could have a common layer for the Model and ViewModel so we can have an Android app using Xamarin Forms (maybe later iOS) and a WPF app for Windows 7 users.  The DataForm would be perfect.  Is it possible to have data annotations that would work for both or do you have to duplicate effort here.
Tsvyatko
Telerik team
 answered on 05 Apr 2016
2 answers
124 views

I am encountered with following errors while trying to deploy app in ios simulator

1)ErrorDuplicate symbol in: /Users/ComTec/Library/Caches/Xamarin/mtbs/builds/chartsample2iOS/48534ae52ccc8ef3258af6378e6dc16b/obj/iPhoneSimulator/Debug/mtouch-cache/TelerikUI.a(TKChartAnnotation.o) (Location related to previous error)chartsample2.iOS

 

2)ErrorNative linking failed, duplicate symbol: '_llvm.embedded.module'.chartsample2.iOS



Lakshmi
Top achievements
Rank 1
 answered on 31 Mar 2016
6 answers
141 views

Hi,

I am trying to replicate the UI from your ios demo app, where an event spans over multiple days as a coloured bar. (attached)

I had a look at the source in objective c and convert it to c#:

calEvent = new TKCalendarEvent ();
calEvent.Title = “name”;
calEvent.StartDate = (NSDate)startDate;
calEvent.EndDate = (NSDate)endDate;
calEvent.AllDay = true;
calEvent.EventColor = UIColor.Red;

but what I get is an event displayed on the startDate only, not a bar from startDate to endDate.

What am I doing wrong?

Thank you,

Gelu

Nikolay
Telerik team
 answered on 24 Mar 2016
1 answer
115 views

Hey,

I'm using the 'Custom Labels' function for a DateTimeAxis and it works.

But the vertical gridlines are not matching with the 'Custom Labels'.

What is a proper way to fix this problem?

 

kind regards,

Marcel

Adrian
Telerik team
 answered on 18 Mar 2016
1 answer
95 views
How to trigger an event once the List View Item has been swipe to left or right.
Rosy Topchiyska
Telerik team
 answered on 17 Mar 2016
1 answer
125 views

Hello, 

I am trying to make the entire chart rendering area respond to a user's 'tap' by using a TapGestureRecognizer. This works fine when running on Android, but when I run it in iOS, the tap is never recognized. 

Rosy Topchiyska
Telerik team
 answered on 14 Mar 2016
6 answers
922 views

I am using the telerik listview in our project(Xamarin.forms). I have a scenario where i want to disable the scrolling of telerik listview. I have xamarin scroll view inside that i have telerik listview also some other controls. I want the full page scroll able. But due to telerik internal scrolling the full page does not become scroll able. Could you please help with this.

 

Thanks In Advance.

Tsvyatko
Telerik team
 answered on 12 Mar 2016
1 answer
228 views

Hi,

in order to improve performance, I want to pause downloading of images when user is in fling scrolling mode.

_myListView.ScrollStateChanged += (object sender, ScrollStateChangedEventArgs scrollArgs) =>
{
  switch (scrollArgs.ScrollState)
  {
    case ScrollState.Fling:
      ImageService.SetPauseWork(true); // all image loading requests will be silently canceled
      break;
    case ScrollState.Idle:
      ImageService.SetPauseWork(false); // loading requests are allowed again
 
      // Here you should have your custom method that forces redrawing visible list items
      _myListView.ForcePdfThumbnailsRedraw();
      break;
  }
};

source: https://github.com/molinch/FFImageLoading/wiki/Advanced-Usage

ScrollStateChanged is came from Android.Widget.AbsListView, but RadListView isn't derived from this class.

any option to add this event ?

Thank you

Todor
Telerik team
 answered on 12 Mar 2016
7 answers
272 views
I am using a DateTimeContinuousAxis to display various metrics over time.  I have set the LabelFormat to M/dd/yy h:mm.  However, even though I convert the DateTime values from UTC to local time before setting the data on the chart, the labels are displayed in UTC. How can I change this?  Also, regarding the LabelFormt, how can I get AM or PM displayed?  I have tried adding tt to the format string, but it does not seem to work?
s.smith@oneeventtechnologies.com
Top achievements
Rank 1
 answered on 07 Mar 2016
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?