-
- gjacob-RCG
- Posts: 5
- Joined:
ComboBox and Mobile
Hi,
I'm working on a project using Unity, Noesis and Visual Studio.
For this project,I created a style for the ComboBox control.
I added in a xaml and set the MaxDropDownHeight.
I tested the result with Visual and Unity for the PC platform and had no problems.
But When I tested on mobile (Android & iOS), the popup of the comboBox is cut off (see picture).
(On the picture, the green area represents the location of the combobox when it is open)

Are there any constraints specific to mobile for comboBox?
I'm working on a project using Unity, Noesis and Visual Studio.
For this project,I created a style for the ComboBox control.
I added in a xaml and set the MaxDropDownHeight.
Code: Select all
<ComboBox Width="800" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="0 250 0 0" MaxDropDownHeight="420">
But When I tested on mobile (Android & iOS), the popup of the comboBox is cut off (see picture).
(On the picture, the green area represents the location of the combobox when it is open)

Are there any constraints specific to mobile for comboBox?
-
- KeldorKatarn
- Posts: 234
- Joined:
Re: ComboBox and Mobile
The size of the popup is not related to the size of the ComboBox control. It's a separate element on a different layer. So that might be a styling thing. You should check the ControlTemplate. Setting the Width and Height of the ComboBox doesn't affect the Dropdown Popup size necessarily. That depends on how the control template is written.Hi,
I'm working on a project using Unity, Noesis and Visual Studio.
For this project,I created a style for the ComboBox control.
I added in a xaml and set the MaxDropDownHeight.I tested the result with Visual and Unity for the PC platform and had no problems.Code: Select all<ComboBox Width="800" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="0 250 0 0" MaxDropDownHeight="420">
But When I tested on mobile (Android & iOS), the popup of the comboBox is cut off (see picture).
(On the picture, the green area represents the location of the combobox when it is open)
Are there any constraints specific to mobile for comboBox?
-
- gjacob-RCG
- Posts: 5
- Joined:
Re: ComboBox and Mobile
Hi KeldorKatarn,
In my ControlTemplate, I apply the combobox values to width and height.
I've even tried replacing templateBinding with fixed values, but the result is the same.
But maybe I didn't do it properly.
Below is the popup code in my style.
In my ControlTemplate, I apply the combobox values to width and height.
I've even tried replacing templateBinding with fixed values, but the result is the same.
But maybe I didn't do it properly.
Below is the popup code in my style.
Code: Select all
<Popup
Name="Popup"
Placement="Bottom"
IsOpen="{TemplateBinding IsDropDownOpen}"
AllowsTransparency="True"
Focusable="False"
PopupAnimation="Slide">
<Grid Name="DropDown"
SnapsToDevicePixels="True"
MinWidth="{TemplateBinding ActualWidth}"
MaxHeight="{TemplateBinding MaxDropDownHeight}">
<Border x:Name="DropDownBorder" Background="Gray" CornerRadius="10" />
<ScrollViewer Margin="15 5 30 5" SnapsToDevicePixels="True">
<StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Contained" />
</ScrollViewer>
</Grid>
</Popup>
-
-
sfernandez
Site Admin
- Posts: 3198
- Joined:
Re: ComboBox and Mobile
No, the code is the same for all platforms. The only limitation is given by the View (the surface) size.Are there any constraints specific to mobile for comboBox?
Could you connect the Inspector and investigate the sizes of the parent elements of the drop down, to see if there is any unexpected Height or MaxHeight?
-
- gjacob-RCG
- Posts: 5
- Joined:
Re: ComboBox and Mobile
Hi sfernandez,
I checked with Noesis inspector and all the values (ActualWidth & ActualHeight) are indeed those defined as desired.
I can't understand why the popup UI is cut off as if there were a mask, but that's not the case.
I checked with Noesis inspector and all the values (ActualWidth & ActualHeight) are indeed those defined as desired.
I can't understand why the popup UI is cut off as if there were a mask, but that's not the case.
-
-
sfernandez
Site Admin
- Posts: 3198
- Joined:
Re: ComboBox and Mobile
Could you please provide a RenderDoc capture of a frame showing the ComboBox dropdown in that device?
-
- gjacob-RCG
- Posts: 5
- Joined:
Re: ComboBox and Mobile
I created a NoesisGUI Issue Tracker and I have attached the RenderDoc capture of a frame showing the ComboBox dropdown for google pixel 8 pro & the xaml for my ComboBox Style.
https://www.noesisengine.com/bugs/view.php?id=3934
https://www.noesisengine.com/bugs/view.php?id=3934
Re: ComboBox and Mobile
Any chance you're applying a ScaleTransform to the combobox or its parent panels, say, to fit to different screen resolutions?
I had a similar issue before and that was the reason in my case.
I had a similar issue before and that was the reason in my case.
-
- gjacob-RCG
- Posts: 5
- Joined:
Re: ComboBox and Mobile
Hi Alexk,
I don't use ScaleTransform but Viewbox so that the xaml content remains in 16:9 format whatever the screen.
I don't use ScaleTransform but Viewbox so that the xaml content remains in 16:9 format whatever the screen.
Who is online
Users browsing this forum: No registered users and 3 guests