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)
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
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
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
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.
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.
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