Telerik Forums
UI for Xamarin Forum
1 answer
203 views

I have a telerikDataControls:RadListView.ItemTemplateSelector working nicely. 

<telerikDataControls:RadListView.ItemTemplateSelector>
    <vm:TodayCellSelector
        AllDayTemplate="{StaticResource AllDayCellTemplate}"
        InspirationTemplate="{StaticResource InspirationCellTemplate}"
        ErrorTemplate="{StaticResource ErrorCellTemplate}">

 

The templates are in separate files like this:

<?xml version="1.0" encoding="utf-8"?>
<?xaml-comp compile="true" ?>
<ResourceDictionary
    xmlns:telerikListView="clr-namespace:Telerik.XamarinForms.DataControls.ListView;assembly=Telerik.XamarinForms.DataControls"
    <DataTemplate  x:Key="ErrorCellTemplate">
        <telerikListView:ListViewTemplateCell>
            <telerikListView:ListViewTemplateCell.View>
                <Label Text="ERROR"></Label>
            </telerikListView:ListViewTemplateCell.View>
        </telerikListView:ListViewTemplateCell>
    </DataTemplate>
</ResourceDictionary>

 

Problem: I need to call an ICommand on the parent Page from the Cell. How do I reference the page? I tried to give the page a x:Name and try that in the Binding on the Cell, but the compiler throws an error that it can't find the Page.

The cell, if placed in the main page works fine, but the cells are huge so I want them in separate files to manage.

TappedCommand="{Binding Source={x:Reference MyPage}, Path=BindingContext.EventDetailCommand}"

 

 

 

 

 

Lance | Senior Manager Technical Support
Telerik team
 answered on 01 Feb 2019
5 answers
197 views

Here's my code. I have attached a screenshot of the resulting chart. I have a few questions...

1. How do I remove the horizontal marks on the left axis?

2. How do I remove the spacing between each bar?

3. How do I make it always show '0' on the horizontal axis?

<telerikChart:RadCartesianChart PaletteName="Light" SelectionPaletteName="LightSelected" Margin="10,10,10,10" Grid.Row="0" x:Name="hoursChart" BackgroundColor="White">
                <telerikChart:RadCartesianChart.HorizontalAxis>
                    <telerikChart:NumericalAxis MajorStep="10" LineColor="White" MajorTickBackgroundColor="White"  />
                </telerikChart:RadCartesianChart.HorizontalAxis>
                <telerikChart:RadCartesianChart.VerticalAxis>
                    <telerikChart:CategoricalAxis  GapLength="0" LineColor="Transparent"  MajorTickThickness="1" PlotMode="BetweenTicks" LabelFitMode="MultiLine"  ShowLabels="False" MajorTickBackgroundColor="#A9A9A9" />
                </telerikChart:RadCartesianChart.VerticalAxis>
                <telerikChart:RadCartesianChart.Series>
                    <telerikChart:BarSeries CategoryBinding="Category" ValueBinding="Value" ItemsSource="{Binding SeriesData}" CombineMode="Stack" />
                    <telerikChart:BarSeries CategoryBinding="Category" ValueBinding="Value" ItemsSource="{Binding SecondSeriesData}" CombineMode="Stack" />
                    <telerikChart:BarSeries CategoryBinding="Category" ValueBinding="Value" ItemsSource="{Binding ThirdSeriesData}" CombineMode="Stack" />
                    <telerikChart:BarSeries CategoryBinding="Category" ValueBinding="Value" ItemsSource="{Binding FourthSeriesData}" CombineMode="Stack" />
                </telerikChart:RadCartesianChart.Series>
                <telerikChart:RadCartesianChart.Palette>
                    <telerikChart:ChartPalette >
                        <telerikChart:ChartPalette.Entries>
                            <telerikChart:PaletteEntry  FillColor="#d12f23" StrokeColor="Transparent" />
                            <telerikChart:PaletteEntry FillColor="#eebc2c" StrokeColor="Transparent" />
                            <telerikChart:PaletteEntry FillColor="#b1a58f" StrokeColor="Transparent" />
                            <telerikChart:PaletteEntry FillColor="#86c4cd" StrokeColor="Transparent" />
                        </telerikChart:ChartPalette.Entries>
                    </telerikChart:ChartPalette>
                </telerikChart:RadCartesianChart.Palette>
            </telerikChart:RadCartesianChart>
Didi
Telerik team
 answered on 01 Feb 2019
1 answer
160 views

Hallo,

after update Skiasharp to the last version:

when i set the Itemsource to datagrid and the column/s is null or emtpy i get this exception :

System.ArgumentNullException: Value cannot be null.
Parameter name: buffer

i rolled back to Skiasharp ver. 1.60.3 and the error is gone!

i think is a error in your Library or something please check!

Gruß

Yana
Telerik team
 answered on 01 Feb 2019
7 answers
192 views

hi,

i have latest version of RadCalendar. if i change phone language to norway it should display start of week from Monday. 

but it is not ! Any bug or am i missing something

Yana
Telerik team
 answered on 01 Feb 2019
3 answers
205 views

I would like to change the height of the GroupHeaderTemplate to match the content that I put in it. This works in Android. For example, if I have a Grid with a HeightRequest of 70, the GroupHeaderTemplate will be a height of 70 on Android. However, for iOS the height is fixed and will never change no matter how tall or short the content is.

How can I change the height on iOS?

Patrick
Top achievements
Rank 1
 answered on 31 Jan 2019
3 answers
104 views
hello, I have Problem About  how to set a HeightRequest for treeview control item in iOS.  Now it's avalable in UWP/Android platform.I provide screenshot in attach file,how can i slove it ,thanks.
Didi
Telerik team
 answered on 30 Jan 2019
2 answers
430 views

    Hi T, I have a requirement to display a list of horizontal cards that have a shadow affect.  The card is just a grid with some icons and labels. The design calls for a shadow around each card to make them look elevated.   I immediately thought of RadBorder but it does not have that ability.  Currently I am using 2 Frame tags but I was told that can be expensive performance wise.  Has anyone achieved Shadowed bordering using Styles or maybe a renderer?

 

Thanks,

Brian

Brian
Top achievements
Rank 2
 answered on 28 Jan 2019
1 answer
134 views
We are experiencing an issue implementing a custom search on the control. We use MVVM, and have had to adapt the control to get everything wired up. However, on iOS devices only (no emulators) we frequently see the control lock the app up. It doesn'tcrash, just freezes and is unresponsive (I've let it wait for over an hour and it does not unfreeze). Below is the XAML, the code-behind and the method on the ViewModel for the search. Any help would be appreciated, as if we cannot solve the freezing we will have to make use of entry controls instead.
 

The XAML:

<telerikInput:RadAutoCompleteView
                    x:Name="radACV"
                    BackgroundColor="White"
                    CornerRadius="5"
                    HeightRequest="30"
                    TextChanged="radACV_TextChanged"
                    SuggestionItemSelected="radACV_SuggestionItemSelected"
                    TextSearchPath="Name"
                    SearchThreshold="3"
                    SuggestMode="Suggest"
                    CompletionMode="Contains"
                    DisplayMode="Plain"
                    ShowSuggestionView="True"
                    SuggestionViewHeight="200">
                    <telerikInput:RadAutoCompleteView.LoadingTemplate>
                        <DataTemplate>
                            <StackLayout Orientation="Horizontal" HorizontalOptions="Center" Margin="0, 20, 0, 20">
                                <Label Text="Searching ... " FontSize="16" TextColor="#8E8E93"/>
                                <telerikPrimitives:RadBusyIndicator 
                                HeightRequest="24"
                                WidthRequest="24"
                                IsBusy="True"
                                VerticalOptions="Start"
                                AnimationContentColor="Accent"
                                AnimationType="Animation9">
                                </telerikPrimitives:RadBusyIndicator>
                            </StackLayout>
                        </DataTemplate>
                    </telerikInput:RadAutoCompleteView.LoadingTemplate>
                </telerikInput:RadAutoCompleteView>

The code-behind:
private string currentSearchText;
private string previousSearchText;
private bool isRemoteSearchRunning;
private bool isSelected = false;
 
        private async void radACV_TextChanged(object sender, TextChangedEventArgs e)
        {
            if (!isSelected)
            {
                var autoCompleteView = (RadAutoCompleteView)sender;
                var vm = (DocSearchViewModel)BindingContext;
 
                currentSearchText = e.NewTextValue ?? string.Empty;
                previousSearchText = e.OldTextValue ?? string.Empty;
 
                if (currentSearchText.Length >= autoCompleteView.SearchThreshold && !isRemoteSearchRunning)
                {
                    isRemoteSearchRunning = true;
                    if (autoCompleteView.ItemsSource == null) //if the item source is null, get new
                    {
                        autoCompleteView.ItemsSource = await vm.LoadItems(currentSearchText);
                    }
                    else if (!currentSearchText.Contains(previousSearchText)) //if the new search text is not a narrowing of the previous text, get new
                    {
                        autoCompleteView.ItemsSource = await vm.LoadItems(currentSearchText);
                    }
                    isRemoteSearchRunning = false;
                }
                else if (e.NewTextValue.Length == 0)
                {
                    autoCompleteView.ItemsSource = null;
                    vm.Selected = null;
                }
                else
                {
                    autoCompleteView.ItemsSource = null;
                }
            }
            else
            {
                isSelected = false;
            }
        }
 
        private void radACV_SuggestionItemSelected(object sender, SuggestionItemSelectedEventArgs e)
        {
            var autoCompleteView = (RadAutoCompleteView)sender;
            isSelected = true;
 
            var selectedItem = (ItemModel)e.DataItem;
            var vm = (ViewModel)BindingContext;
            vm.Selected = selectedItem;
        }

 

The ViewModel Search function:

public async Task<List<ItemModel>> LoadItems(string search)
        {
            var items = new List<ItemModel>();
            try
            {
                IsBusy = true;
                items = await _dataService.GetItems(search);
            }
            catch (Exception e)
            {
                ReportingService.LogAppError(e);
            }
            finally
            {
                IsBusy = false;
            }
            return items;
        }
Nasko
Telerik team
 answered on 28 Jan 2019
1 answer
161 views

Will AutoCompleteView be bind Text property?

When I setup View for binding Text property, then if I select item in autoComplete, Text property remains empty.

Yana
Telerik team
 answered on 28 Jan 2019
2 answers
747 views

Hi, I am stuck at:

I can set the SlidingToIndex command, but I can't define the {binding} part like for the RadListview (for exemple: <telerikListViewCommands:ListViewUserCommand Id="ItemTap" Command="{Binding ItemTapCommand}" />)

Any idea?

 

<telerikPrimitives:RadSlideView x:Name="slideView">
    <telerikPrimitives:RadSlideView.ItemsSource>
        <x:Array Type="{x:Type ContentView}">
            <ContentView>
                <telerikInput:RadCalendar Margin="50, 30"/>
            </ContentView>
            <ContentView>
                <Label HorizontalOptions="Center" VerticalOptions="CenterAndExpand" Text="Other View" TextColor="Blue" />
            </ContentView>
            <ContentView>
                <Label HorizontalOptions="Center" VerticalOptions="CenterAndExpand" Text="Another View" TextColor="Red" />
            </ContentView>
        </x:Array>
    </telerikPrimitives:RadSlideView.ItemsSource>
    <telerikPrimitives:RadSlideView.Commands>
        <telerikSlideViewCommands:SlideViewCommand Id="SlidingToIndex" />
    </telerikPrimitives:RadSlideView.Commands>
</telerikPrimitives:RadSlideView>
Pierre
Top achievements
Rank 2
Iron
Iron
 answered on 25 Jan 2019
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?