You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Here we try to preselect as per https://learn.microsoft.com/en-us/dotnet/maui/user-interface/controls/collectionview/selection#multiple-preselection
SelectedItems = new ObservableCollection<object>()
{
Items[1], Items[3]
};
}
public ObservableCollection<string> Items { get; set; }
public ObservableCollection<object> SelectedItems
{
get => selectedItems;
set => SetProperty(ref selectedItems, value);
}
ObservableCollection<object> selectedItems;
[RelayCommand]
Task PreSelectUsingBinding()
{
SelectedItems = new ObservableCollection<object> { Items[1], Items[3] };