

Hi,
is there a way to center text inside LoadOnDemandItemTemplate template?
The current code in the documentation produces left aligned text. Thanks
<telerikDataControls:RadListView.LoadOnDemandItemTemplate> <DataTemplate> <Grid BackgroundColor="Red"> <Label FontSize="24" HorizontalOptions="Center" Text="Load more items" TextColor="Black" /> </Grid> </DataTemplate></telerikDataControls:RadListView.LoadOnDemandItemTemplate>
Hi there
I can't get the AutoComplete control to update it's ItemsSource via data binding. Everything appears to go smoothly... I use the OnPropertyChanged event to update the ObservableCollection<string> in the model, and then call RaisePropertyChanged("SearchResults"), but nothing happens client side. It's still attached to the original list of test items I started with. I don't replace the ObservableCollection, I'm clearing it and then added the new values. If I try to replace the collection, the application crashes.
xaml
<input:RadAutoComplete
x:Name="AutoCompleteAddress"
Watermark="Search here..."
ItemsSource="{ Binding SearchResults }"
PropertyChanged="AutoCompleteAddress_OnPropertyChanged"
CompletionMode="Contains"/>
Code Behind
private void AutoCompleteAddress_OnPropertyChanged(object sender, PropertyChangedEventArgs e)
{
if (e.PropertyName == "Text")
{
var addressDetailsPageModel = (AddressDetailsPageModel)BindingContext;
addressDetailsPageModel.SearchAddress(AutoCompleteAddress.Text.Trim());
}
}
Page Model
public async void SearchAddress(string searchText)
{
var searchResults = await _addressSearchService.SearchAsync(searchText);
SearchResults.Clear();
foreach (var searchResult in searchResults)
SearchResults.Add(searchResult);
RaisePropertyChanged("SearchResults");
}
public ObservableCollection<string> SearchResults { get; set; }
Any ideas?
Cheers
So I have a button that is revealed when a user swipes a cell. I then want to change the Cell BackgroundColor when the revealed button is tapped. I am having a tough time since the Button has no correlation to the cell the user swiped. I tried to implement a style trigger as I feel this would be the way to do it but I am not sure how to implement that with the RadListView. This is what I tried:
<ContentView.Resources> <ResourceDictionary> <Style TargetType="dataControls:RadListView" x:Key="CellStyle"> <Style.Triggers> <DataTrigger Binding="{Binding ButtonText}" Value="Start"> <Setter Property="BackgroundColor" Value="White" /> </DataTrigger> <DataTrigger Binding="{Binding ButtonText}" Value="Complete"> <Setter Property="BackgroundColor" Value="Gray" /> </DataTrigger> </Style.Triggers> </Style> </ResourceDictionary> </ContentView.Resources>Hi, I'm creating a calendar control in xaml and ideally want to set the 'TrySetViewMode' (viewmode) in xaml but there doesnt seem a way to do this. I would like to bind it via a view model so i can switch the view to day/month etc.
For now i'm looking at just setting it int he content page code behind.
i've added the renderer as per the sample QR project.
xaml:
<Controls:DayViewCalendar
IsVisible="{Binding IsDayViewVisible}"
AppointmentsSource="{Binding Appointments}"
VerticalOptions="FillAndExpand"
SelectedDate="{Binding SelectedDate, Mode=TwoWay}"
x:Name="calendar" >
<Controls:DayViewCalendar.AppointmentsStyle>
<telerikInput:CalendarAppointmentsStyle DisplayMode="Shape" ShapeType="Ellipse" />
</Controls:DayViewCalendar.AppointmentsStyle>
</Controls:DayViewCalendar>
in the code behind i'm calling:
in contructor:
InitializeComponent();
calendar.TrySetViewMode(CalendarViewMode.Day);
But on run this still shows the month view and not day view. but if i hook up the CellTapped event and change in there is changes the view.
How can i get round this? and ideally how can I set this in XAML bound to a viewmodel?
regards
Steve

I'm trying to create a customrenderer for the ListView control to allow me to scroll to a specific item in list. I've managed to do this for Android, although I had to do reflection to get at the needed properties. But it works well enough.
I'm now trying to implement for iOS and am running into a problem finding the NSIndexPath for the selected item.
I've found the ScrollToItem method on TKListView, but it requires an NSIndexPath. I have access to the actual item from my Xamarin.Forms library, how do I translate that into an NSIndexPath?