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

DropdownBox show outside IOS Phone

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

1 Reply

HM Hemalatha Marikumar Syncfusion Team 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. 


Loader.
Up arrow icon