Dim cbitem As ComboBoxItem
Comboyears.MaxDropDownHeight = 344
For i = 1900 to 2020
cbitem = New ComboBoxItem
With cbitem
.Background = brushseg
.FontFamily = New FontFamily("calibri")
.FontWeight = Windows.UI.Text.FontWeights.Bold
.FontSize = "21"
.Height = "36"
..Content = "years & " " & i
End With
Comboyears.Items.Add(cbitem)
Next
How to set maxdowndropitems of a combobox uwp
Shay Wilner
1,746
Reputation points
Hi
In windows form application combobox has maxdowndropitems propertie but not in uwp so how i can limit the drop items ?
Thanks
Accepted answer
-
Shay Wilner 1,746 Reputation points
2020-04-08T11:39:20.287+00:00
1 additional answer
Sort by: Most helpful
-
Shay Wilner 1,746 Reputation points
2020-04-07T20:14:21.293+00:00 Ok
I found that is better to popup the combobox using comboboxitem and i also can play with the backcolor and using the MaxDropDownHeightComboyears.MaxDropDownHeight = 344
Dim cbitem As ComboBoxItem
For i = 1900 to 2020
cbitem = New ComboBoxItem
With cbitem
.Background = brushseg
.FontFamily = New FontFamily("calibri")
.FontWeight = Windows.UI.Text.FontWeights.Bold
.FontSize = "21"
.Height = "36"
.Content = "years & " " & iEnd With Comboyears.Items.Add(cbitem) Next