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

DropdownBox show outside IOS Phone

Thread ID:

Created:

Updated:

Platform:

Replies:

148532 Oct 24,2019 01:36 AM UTC Oct 25,2019 01:46 AM UTC Xamarin.Forms 1
loading
Tags: SfComboBox
Nguyen Khoa Lu
Asked On October 24, 2019 01:36 AM UTC

Hi, I have 1 dropdown put at position right screen. It show outside
After that, how to setting an image click show dropdownbox. Thanks
 var imgType = new Image
                    {
                        Source = "ic_settings_gray_24dp.png",
                        HeightRequest = 36,
                        WidthRequest = 36,
                        VerticalOptions = LayoutOptions.CenterAndExpand
                    };
var bsType = new DropDownButtonSettings
                    {
                        FontSize = 36,
                        Height = 36,
                        Width = 36,
                        View = imgType
                    };
var cbType = new SfComboBox
                    {
                        HorizontalOptions = LayoutOptions.EndAndExpand,
                        VerticalOptions = LayoutOptions.CenterAndExpand,
                        ShowBorder = false,
                        IsSelectedItemsVisibleInDropDown = false,
                        //SelectedIndex = 0,
                        WidthRequest = 36,
                        DropDownWidth = App.setting.DropdownWidthChart,
                        SuggestionBoxPlacement = SuggestionBoxPlacement.Bottom,
                    };

Attachment: ReportErr_1d73f532.zip

Hemalatha Marikumar [Syncfusion]
Replied On October 24, 2019 11:36 AM UTC

Hi Nguyen,

Greetings from Syncfusion. 
 
We have analyzed your requirement from the attached screenshot in the last update. The SfComboBox’s DropDown opens from the control position and we do not have the support for positioning the dropdown. Hence, we have achieved your requirement using SfPopupLayout and ListView. Please have the sample from the below link.

Sample Linkhttps://www.syncfusion.com/downloads/support/directtrac/general/ze/ComboBox_1485321388367191

Code Snippet: 
 <sfPopup:SfPopupLayout x:Name="popupLayout">

 
    <sfPopup:SfPopupLayout.PopupView> 
        <sfPopup:PopupView ShowFooter="False" ShowHeader="False"> 
            <sfPopup:PopupView.ContentTemplate> 
                <DataTemplate> 
                     <ListView x:Name="listView" ItemSelected="listView_ItemSelected" ItemsSource="{Binding BookInfo}" SeparatorColor="White"> 
                <ListView.ItemTemplate> 
                    <DataTemplate> 
                        <ViewCell> 
                            <StackLayout HeightRequest="40"> 
                                <Label Margin="10,7,0,0"  
                                       Text="{Binding BookName}"  
                                       FontSize="16"/> 
                            </StackLayout> 
                        </ViewCell> 
                    </DataTemplate> 
                </ListView.ItemTemplate> 
            </ListView> 
                </DataTemplate> 
            </sfPopup:PopupView.ContentTemplate> 
        </sfPopup:PopupView> 
    </sfPopup:SfPopupLayout.PopupView> 
   <sfPopup:SfPopupLayout.Content> 
     <StackLayout x:Name="layout" Padding="10,60,10,10"> 
       <Button x:Name="PopupImage" WidthRequest="30" HeightRequest="30" HorizontalOptions="End" Clicked="ClickToShowPopup_Clicked" /> 
     </StackLayout> 
    </sfPopup:SfPopupLayout.Content> 
  </sfPopup:SfPopupLayout> 


Output:
 

Please check with the sample and let us know if you have any concerns. 
 
Regards, 
Hemalatha M. 


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