I have a SfComboBox:
<SfComboBox:SfComboBox x:Name="actionsComboBox" BackgroundColor="White" TextSize="8" IndicatorText="Actions...1" Text="Actions..." ShowBorder="true" SelectionChanged="comboBox_SelectionChanged" WidthRequest="300" HorizontalOptions="End" VerticalOptions="Fill" MaximumDropDownHeight="600" IsEditableMode="False" ShowClearButton="False" ShowSuggestionsOnFocus="True" SuggestionBoxPlacement="Top" DataSource="{Binding GridActionItemNames}" IsDropDownOpen="True" HeightRequest="40" IsVisible="{Binding ShowingGridActionsMenu}" /> |
Setting actionsComboBox.IsDropDownOpen = true works for iOS but not on Android. Any work-
protected override void OnAppearing()
{
base.OnAppearing();
comboBox.IsDropDownOpen = true;
} |
Your example does not work if the device is in landscape mode:
Tested with 19.2.46 also and same behavior.
Thanks!
Hi,
I am using 19.3.0.46 and I also find this property doesn't work as I would expect.
If I set it to true in my xaml, the combo is not dropped down when my page opens.
If I bind it to a boolean property on my page model, it does not open when my page model sets it to true.
The only way I have managed to get it to work is using the info in this post and controlling it in the code behind (not my preferred option). This would imply the fix you refer to in 19.2.0.46 has not worked? Also, even though I can drop it down from the code behind, the drop down is not lined up under my combobox (see image). It is possible that this is caused by use within a Rg.Plugins.Popup popup page?
Is there a way I can programmatically control IsDropDownOpen other than in OnAppearing() ?
thanks
Paul
protected override void OnAppearing()
{
if (Device.RuntimePlatform == Device.Android)
{
Device.StartTimer(TimeSpan.FromSeconds(3), () =>
{
autoComplete4.IsDropDownOpen = true;
return false;
});
}
base.OnAppearing();
}
|