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. Image for the cookie policy date

SfComboBox autoexpand if multiple items selected

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>

3 Replies

MK Muneesh Kumar G Syncfusion Team 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. 



JM Jiri Matejka 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


MK Muneesh Kumar G Syncfusion Team 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. 


Loader.
Up arrow icon