We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

SfComboBox autoexpand if multiple items selected

Thread ID:

Created:

Updated:

Platform:

Replies:

144490 May 8,2019 06:23 PM UTC May 10,2019 04:28 AM UTC Xamarin.Forms 3
loading
Tags: SfComboBox
Jiri Matejka
Asked On May 8, 2019 06:23 PM UTC

Hi,

am using SfComboBox to select multiple options. I need to show all the selected items without a need to scroll up/down or swipe left/right. Is there a way how to achieve that?

Am using the code below here HeightRequest is caluclated in the viewmodel based on items count but it's far from perfect as it highly depends on screen size, pixel density etc. Also if there is a very long item, it does not wrap and the close button (on the right) is hidden and cannot be used. 

Attaching some sample screenshots. 

thanks

Jiri

 <sfcom:SfComboBox x:Name="cmbLabels"                                                            
                                  IsEnabled="{Binding IsBusy, Converter={StaticResource negateBoolean}}"
                                  HeightRequest="{Binding LabelsHeight}"
                                  IsEditableMode="false"
                                  TokensWrapMode="Wrap"
                                  IsSelectedItemsVisibleInDropDown="false"
                                  MultiSelectMode="Token"                                      
                                  SelectionChanged="cmbLabels_Changed">
                        <sfcom:SfComboBox.TokenSettings>
                            <sfcom:TokenSettings FontSize="15" 
                                            BackgroundColor="#66ccff" 
                                            TextColor="White"                                                  
                                            SelectedBackgroundColor="#ffffe0" 
                                            DeleteButtonColor="Navy"                                                     
                                            IsCloseButtonVisible="true" 
                                            CornerRadius="10">
                            </sfcom:TokenSettings>
                        </sfcom:SfComboBox.TokenSettings>
                    </sfcom:SfComboBox>

Muneesh Kumar G [Syncfusion]
Replied On May 9, 2019 12:29 PM UTC

Hi Jiri, 
 
Greetings from Syncfusion. 
 
Query 1 : HeightRequest need to be set instead of scrolling. 
 
We have checked your requirement from our side and in our current implementation, we currently do not have support for "HeightRequest need to get updated with respect to token selection". We have already logged a feature report for the same. You can find the feedback link details from below.  
  
 
Please cast your vote to make it count. We will prioritize the features every release based on the demands.  
   
If you have any more specification/suggestions to the feature request, you can add it as a comment in the portal.  
 
Query 2 : DeleteButton is not visible. 
 
We have checked your requiement and have prepared a sample with DeleteButtonPlacement option set as left when the TokenWrap is set. Please have the code snippet and sample from the below link, 
 
Code Snippet: 
 
DeleteButtonPlacement="Left" 
 
Please check with the sample and let us know if you have any concern. 
 
Thanks, 
Muneesh Kumar G. 


Jiri Matejka
Replied On May 9, 2019 03:24 PM UTC

Thanks for logging the enhancement request, I already upvoted that. 

Re the delete button - yes, the left placement is the workaround I am going to use for now. 

Thanks for your help!

Jiri

Muneesh Kumar G [Syncfusion]
Replied On May 10, 2019 04:28 AM UTC

Hi Jiri, 
 
Thanks for the update. Please let us know if you need any further assistance. 
  
Thanks, 
Muneesh Kumar G. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon