Hi, I ran into an issue the other day with the RadComboBox.
I have a RadComboBox with an ItemTemplate and a FooterTemplate. The FooterTemplate has a button inside it and the Item Template has some Labels and Images data bound to the ViewModel. When I run my app and I tap on the drop down in the RadComboBox, the footer pushes the items up and also overlays some of the items. Below is an image of my issue. I'm currently running 1.0.1 and have updated to 2.30 and experienced the same issue.
Hi Scot,
I have tested the scenario when adding a FooterTemplate to the ComboBox control and cannot reproduce the behavior. Please send me the xaml definition of the template and the page where the ComboBox control is defined. I assume the issue is a layout issue and I need to research this case in details.
Sure, here's a test XAML page, Viewmodel, and Model that reproduces my issue
MainPage.xaml
<?xml version="1.0" encoding="utf-8" ?> <ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:telerik="http://schemas.telerik.com/2022/xaml/maui" x:Class="TestRadComboBox.MainPage"> <ScrollView> <VerticalStackLayout Spacing="25" Padding="30,0" VerticalOptions="Center"> <telerik:RadComboBox ItemsSource="{Binding Items}" DisplayMemberPath="Name" IsEditable="True" SearchMode="Contains" SearchTextPath="Name" Placeholder="Select which city you want to visit" SelectionMode="Multiple" DropDownHeight="300" x:Name="comboBox"> <telerik:RadComboBox.FooterTemplate> <DataTemplate> <StackLayout> <Button Text="Add Items" BackgroundColor="LightBlue"/> </StackLayout> </DataTemplate> </telerik:RadComboBox.FooterTemplate> <telerik:RadComboBox.ItemTemplate> <DataTemplate> <Label Text="{Binding Name}" TextColor="Black"/> </DataTemplate> </telerik:RadComboBox.ItemTemplate> </telerik:RadComboBox> </VerticalStackLayout> </ScrollView> </ContentPage>
MainPage.xaml.cs
namespace TestRadComboBox; public partial class MainPage : ContentPage { public MainPage() { InitializeComponent(); BindingContext = new ViewModel(); } }
City.cs
namespace TestRadComboBox { public class City { public string Name { get; set; } public int Population { get; set; } } }
ViewModel.cs
using System.Collections.ObjectModel; namespace TestRadComboBox { public class ViewModel { public ViewModel() { this.Items = new ObservableCollection<City> { new City { Name = "Tokyo", Population = 13929286 }, new City { Name = "New York", Population = 8623000 }, new City { Name = "London", Population = 8908081 }, new City { Name = "Madrid", Population = 3223334 }, new City { Name = "Los Angeles", Population = 4000000}, new City { Name = "Paris", Population = 2141000 }, new City { Name = "Beijing", Population = 21540000 }, new City { Name = "Singapore", Population = 5612000 }, new City { Name = "New Delhi", Population = 18980000 }, new City { Name = "Bangkok", Population = 8305218 }, new City { Name = "Berlin", Population = 3748000 }, new City { Name = "Tokyo", Population = 13929286 }, new City { Name = "New York", Population = 8623000 }, new City { Name = "London", Population = 8908081 }, new City { Name = "Madrid", Population = 3223334 }, new City { Name = "Los Angeles", Population = 4000000}, new City { Name = "Paris", Population = 2141000 }, new City { Name = "Beijing", Population = 21540000 }, new City { Name = "Singapore", Population = 5612000 }, new City { Name = "New Delhi", Population = 18980000 }, new City { Name = "Bangkok", Population = 8305218 }, new City { Name = "Berlin", Population = 3748000 }, new City { Name = "Tokyo", Population = 13929286 }, new City { Name = "New York", Population = 8623000 }, new City { Name = "London", Population = 8908081 }, new City { Name = "Madrid", Population = 3223334 }, new City { Name = "Los Angeles", Population = 4000000}, new City { Name = "Paris", Population = 2141000 }, new City { Name = "Beijing", Population = 21540000 }, new City { Name = "Singapore", Population = 5612000 }, new City { Name = "New Delhi", Population = 18980000 }, new City { Name = "Bangkok", Population = 8305218 }, new City { Name = "Berlin", Population = 3748000 }, }; } public ObservableCollection<City> Items { get; set; } } }
When I run a new Maui project with this code, I see that the first and last items, "Tokyo" and "Berlin" are completely cut off. If I remove the itemTemplate, "Tokyo" and "Berlin are halfway cut off.
I'm running Telerik UI For Maui 1.0.1