Telerik Forums
UI for Xamarin Forum
1 answer
283 views

Hi Support,

We are currently evaluating Telerik UI for Xamarin. The component we are thinking of using heavily is Accordion Control.

Can you please provide an example on how to add multiple items dynamically to the Accordion?

All the example I found seems to be using XAML with hardcoded items.

 

Thanks.

Regards,

Andrew

Alex
Telerik team
 answered on 19 Feb 2021
8 answers
179 views

Hello

 

I want to use Accordion UI element on my project. I've used the sample code but I have a problem. Instead of the expand arrows, I see the Chinese characters. It seems very weird. I've added an expander and it works fine.

On the attached picture, you will see the expander on the top, and accordion on the bottom. I made blue circle for expander and red circle for accordion.

My core library is .Net Standard 2.0. Maybe it can be the reason. Could you check the problem?

PS: I've tried both with phone and the emulator.

Didi
Telerik team
 answered on 29 Jun 2020
5 answers
95 views

In an accordion on Xamarin try to hide an AccordionItem because in some cases there nothing to show. I added a binding to IsVisible on the AccordionItem and that hides the item but leaves an empty space. So, it's only invisible, but it is still there.

is there a way to hide AccordionItems, where the empty space is collapsed?

 

Kind regards,

Kees Alderliesten

Yana
Telerik team
 answered on 20 Feb 2019
3 answers
285 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
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?