Telerik Forums
UI for Xamarin Forum
1 answer
108 views

I am trying to build a sample of donut series but it throws Null reference exception on Android.

I am using:

- Xamarin forms version 3.2

- Android 8.1

 

Lance | Senior Manager Technical Support
Telerik team
 answered on 12 Nov 2018
3 answers
392 views

I have a performance problem with RadExpder. Accordion menu works faster (or it may be same because I still have not tested how I want)

I have an ObservableCollection list as my source and want to create AccordionItem for each collection item. But somehow I cannot bind what I want. I am adding my code for radaccordion and radexpander. It works with radaccordion but radaccordion seems does not have ItemSource property.

<telerikPrimitives:RadAccordion x:Name="accordion" BindingContext="{Binding Source}" Grid.Row="1"   VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand">
                    <telerikPrimitives:AccordionItem HeaderText="{Binding GroupName}"  IsExpanded="False"  >
                        <telerikPrimitives:AccordionItem.Content>
                            <ScrollView>
                                <customCellItem:CustomParamMeterListItem ItemsSource="{Binding MeterValues2}" />
                            </ScrollView>
                        </telerikPrimitives:AccordionItem.Content>
                    </telerikPrimitives:AccordionItem>
                </telerikPrimitives:RadAccordion>

 

So First of all HeaderText="{Binding GroupName}"  this part gave null exception... If I delete it and write something it works but I cannot see content..

 

Here is the radexpander

<datacontrols:RadListView x:Name="listView" Grid.Row="1"   ItemsSource="{Binding Source}" SelectionMode="None" VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand" >
              <datacontrols:RadListView.ItemTemplate>
                  <DataTemplate>
                      <telerikListView:ListViewTemplateCell >
                          <telerikListView:ListViewTemplateCell.View>
                              <ScrollView VerticalOptions="FillAndExpand" Margin="0,20,0,0" >
                                  <telerikPrimitives:RadExpander x:Name="expander" Style="{StaticResource ExpanderStyle}">
                                      <telerikPrimitives:RadExpander.Header>
                                          <telerikPrimitives:ExpanderHeader>
                                              <Label Text="{Binding GroupName}"  Style="{StaticResource GrouppingTitle}"   />
                                          </telerikPrimitives:ExpanderHeader>
                                      </telerikPrimitives:RadExpander.Header>
                                      <telerikPrimitives:RadExpander.Content>
                                          <ScrollView  Style="{StaticResource ExpanderContent}">
                                              <customCellItem:CustomParamMeterListItem ItemsSource="{Binding MeterValues2}"/>
                                          </ScrollView>
                                      </telerikPrimitives:RadExpander.Content>
                                  </telerikPrimitives:RadExpander>
                              </ScrollView>
                          </telerikListView:ListViewTemplateCell.View>
                      </telerikListView:ListViewTemplateCell>
                  </DataTemplate>
              </datacontrols:RadListView.ItemTemplate>
          </datacontrols:RadListView>

 

So the radexpander is independ on the other radexpander so I created a radlistview and with binding, many expander. I did the same thing with radaccordion but the radaccordion's items always expand, it does not behave same as radexpander. Thats why I need to create one radaccordion and many items depend on my source.

 

I cheched your sample source but not saw any thing what I want. Is there a way to do that?

 

If not:then how I can collapse the radaccordion ITEM in radaccordion when there is only one AccordionItem. The code below works but I just want I can collapse the AccordionItem. (because radaccordion does not allow to collapse the item when there is only one in the radaccordion)

<datacontrols:RadListView x:Name="listView" Grid.Row="1"   ItemsSource="{Binding Source}" SelectionMode="None" VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand" >
              <datacontrols:RadListView.ItemTemplate>
                  <DataTemplate>
                      <telerikListView:ListViewTemplateCell >
                          <telerikListView:ListViewTemplateCell.View>
                              <ScrollView VerticalOptions="FillAndExpand" Margin="0,20,0,0" >
                                  <telerikPrimitives:RadAccordion x:Name="accordion">
                                      <telerikPrimitives:AccordionItem HeaderText="Hebele"  IsExpanded="False"  >
                                          <telerikPrimitives:AccordionItem.Content>
 
                                              <ScrollView>
 
                                                  <customCellItem:CustomParamMeterListItem
                                                  ItemsSource="{Binding MeterValues2}"                                                    
                                              />
                                              </ScrollView>
 
                                          </telerikPrimitives:AccordionItem.Content>
                              </telerikPrimitives:AccordionItem>
                                       
                                  </telerikPrimitives:RadAccordion>
                              </ScrollView>
                          </telerikListView:ListViewTemplateCell.View>
                      </telerikListView:ListViewTemplateCell>
                  </DataTemplate>
              </datacontrols:RadListView.ItemTemplate>
          </datacontrols:RadListView>

 

By the way, I still cannot bind HeaderText like HeaderText="{Binding GroupName}"  Thats why in the code, I gave a hard-coded name.

 

If you can help me, it would be really great. I tried to create a custom expander but the performance was same as the radexpander. Thats why I want to use radaccordion and bind my source.

 

Thank you


 

Didi
Telerik team
 answered on 12 Nov 2018
7 answers
1.0K+ views

Hi,

 

Xamarin forms dependency donesn't recognize in telerik UI 

Error : 'telerikPrimitives' is an undeclared prefix. Line 20, position 10.
Error : 'telerikInput' is an undeclared prefix. Line 24, position 14.

Please provide me a solution.

 

Thanks.

Taqwa
Top achievements
Rank 1
 answered on 12 Nov 2018
1 answer
97 views
Does Telerik support the Xamarin Forms UI components when targeting MacOS in projects?
Lance | Senior Manager Technical Support
Telerik team
 answered on 11 Nov 2018
2 answers
187 views
Is there anyway to show the contextactions assigned to a ListViewTemplateCell in a RadListView?

In vanilla Xamarin Forms, holding down on an item brings up a context menu that can access these actions. Assigning MenuItems to the ListViewTemplateCell  ContextActions collection doesn't seem to reproduce this behavior.
Didi
Telerik team
 answered on 09 Nov 2018
12 answers
265 views

Hi,

Is there a way to make a cell in telerikGrid:DataGridNumericalColumn or a customcolumn go into editmode via a single tap. 

 

Didi
Telerik team
 answered on 09 Nov 2018
3 answers
209 views

Is it possible to have a Content Page inside a SlideView?

I have a SlideView with three ContentViews. each has Xamarin Forms controls on them. I need to reuse the code on one of the content views. What's the best way to do that? I have a page which lists items. Some of the items need to go to this ContentView and other items need to go to a new page with a copy of this ContentView. How do I make the best reuse of this code? 

Lance | Senior Manager Technical Support
Telerik team
 answered on 08 Nov 2018
3 answers
605 views

Hi,

I have a RadSlideView with a Picker in the ContentView (defined in the .xaml file). I'm trying to fill the Picker with items from the .xaml.cs, but I get an  System.NullReferenceException when accessing the Picker.

How can I access a Picker inside a ContentView from .xaml.cs ?

Lance | Senior Manager Technical Support
Telerik team
 answered on 07 Nov 2018
1 answer
405 views

I'm getting formatted html data i need to put into a list list view. My Web view is not displaying the format HTML. It show the html in plain text.

Here is my DataTemplate:

 <DataTemplate x:Key="ListViewItemTemplate">
                <telerikListView:ListViewTemplateCell>
                    <telerikListView:ListViewTemplateCell.View>
                        <StackLayout Padding="20">
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="*"/>
                                </Grid.RowDefinitions>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="*" />
                                </Grid.ColumnDefinitions>

                                <Image Grid.Column="0" Grid.Row="0" Source="{Binding UserIcon}" WidthRequest="35"/>

                                <StackLayout Grid.Column="1" Grid.Row="0" Orientation="Vertical">
                                    <StackLayout Orientation="Horizontal">
                                        <Label Text="{Binding UiDisplayName}" FontFamily="SFProText#600"
                                 FontSize="17" FontAttributes="None" TextColor="#FF000000"/>
                                        <Label Text="{Binding UiTimeStamp}" FontFamily="SFProText#400" FontSize="15"
                                 FontAttributes="None" TextColor="#B36A767D" />
                                    </StackLayout>
                                    <Label Text="{Binding Content}" />
                                    <WebView HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand"
                                            Margin="0" Source="{Binding WebViewSource}" />
                                </StackLayout>
                            </Grid>
                        </StackLayout>
                    </telerikListView:ListViewTemplateCell.View>
                </telerikListView:ListViewTemplateCell>
            </DataTemplate>

 

Any Suggestions?

Lance | Senior Manager Technical Support
Telerik team
 answered on 06 Nov 2018
1 answer
505 views

Hello

I have a parameter list which contains 75 items (I've created a custom UI element. I try to show these params in the content of RadAccordion. Unfortunately it shows only 24 items by using scroll and after 24 items, I cannot scroll.. I've tried with RadExpander, it shows 16 items. I do not give any height value. How I can increase the size? Here is my code

<ContentView.Content>
       <Grid BindingContext="{Binding MeterReadout, Source={StaticResource ViewModelLocator}}"  VerticalOptions="FillAndExpand">
           <StackLayout  Margin="10,20,10,0">
               <datacontrols:RadListView x:Name="listView"   ItemsSource="{Binding Source}" SelectionMode="None" VerticalOptions="FillAndExpand" >
                   <datacontrols:RadListView.ItemTemplate>
                       <DataTemplate>
                           <telerikListView:ListViewTemplateCell >
                               <telerikListView:ListViewTemplateCell.View>
                                   <ScrollView VerticalOptions="FillAndExpand">
                                     <telerikPrimitives:RadExpander x:Name="expander" Style="{StaticResource ExpanderStyle}">
                                               <telerikPrimitives:RadExpander.Header>
                                                   <telerikPrimitives:ExpanderHeader>
                                                   <Label Text="{Binding MeterId}"  Style="{Binding CapitalLettersLabel}"   />
                                            </telerikPrimitives:ExpanderHeader>
                                               </telerikPrimitives:RadExpander.Header>
                                               <telerikPrimitives:RadExpander.Content>
                                               <ScrollView  Style="{StaticResource ExpanderContent}">
 
                                                   <customCellItem:CustomReadoutListItem
                                                       ItemsSource="{Binding MeterValues}"
                                                     
                                                   />
                                               </ScrollView>
                                               </telerikPrimitives:RadExpander.Content>
                                           </telerikPrimitives:RadExpander>
                                    </ScrollView>
                               </telerikListView:ListViewTemplateCell.View>
                           </telerikListView:ListViewTemplateCell>
                       </DataTemplate>
                   </datacontrols:RadListView.ItemTemplate>
               </datacontrols:RadListView>
           </StackLayout>
       </Grid>
   </ContentView.Content>

 

 

Didi
Telerik team
 answered on 06 Nov 2018
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?