///////////////////////////////////////////////////////////////////////////////////
VIEW (CONTENTPAGE)
///////////////////////////////////////////////////////////////////////////////////
<ContentPage
	xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
	xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
	xmlns:viewModels="clr-namespace:App.ViewModels.Pages"
	xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
	x:Class="App.Views.Pages.TestPage"
	x:TypeArguments="viewModels:TestPageViewModel"
	x:DataType="{x:Type viewModels:TestPageViewModel}">
	
	<Grid>
		<editors:SfComboBox 
			HeightRequest="60"
			WidthRequest="200"
			BackgroundColor="White"
			ClearButtonIconColor="#509DC6"
			DropDownIconColor="#509DC6"
			ItemsSource="{Binding Items}"
			SelectedItems="{Binding SelectedItems}"
			SelectionMode="Multiple"
			DisplayMemberPath="DisplayName"
			TextMemberPath="DisplayName"
			SelectedValuePath="Id"
			MultiSelectionDisplayMode="Token"
			SelectionChanged="ItemsSelectionChanged" />
	</Grid>
		
</ContentPage>

///////////////////////////////////////////////////////////////////////////////////
VIEWMODEL
///////////////////////////////////////////////////////////////////////////////////
namespace App.ViewModels.Pages
{
	public partial class TestPageViewModel : ObservableObject
    {
		public TestPageViewModel(IEnumerable<Item> items, IEnumerable<string> selectedIds) 
		{
			Items = items.ToObservableCollection();
	
			SelectedItems = Items.Where(e => selectedIds.Contains(e.Id)).ToObservableCollection<object>();
		}
		
		[ObservableProperty]
		public ObservableCollection<Item> items;

		[ObservableProperty]
		public ObservableCollection<object> selectedItems;
	}
}
