- Home
- Forum
- Xamarin.Forms
- DropdownBox show outside IOS Phone
DropdownBox show outside IOS Phone
Hi, I have 1 dropdown put at position right screen. It show outside
Attachment: ReportErr_1d73f532.zip
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
SIGN IN To post a reply.
1 Reply
HM
Hemalatha Marikumar
Syncfusion Team
October 24, 2019 11:36 AM UTC
Hi Nguyen,
Greetings from Syncfusion.
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 Link: https://www.syncfusion.com/downloads/support/directtrac/general/ze/ComboBox_1485321388367191
Code Snippet:
Sample Link: https://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.
SIGN IN To post a reply.
- 1 Reply
- 2 Participants
-
NK Nguyen Khoa Lu
- Oct 24, 2019 01:36 AM UTC
- Oct 24, 2019 11:36 AM UTC