-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
366 selecteditem binding is not working in list view #367
366 selecteditem binding is not working in list view #367
Conversation
} | ||
//public new IEnumerable ItemsSource |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we need this?
#endregion | ||
#region Constructor | ||
public TMListView() | ||
{ | ||
HasUnevenRows = true; | ||
if (DeviceInfo.Platform == DevicePlatform.WinUI) | ||
{ | ||
SetDynamicResource(BackgroundColorProperty, "CellDefaultBackgroundColor"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we have these changes in the other PR as well
switch (SelectionMode) | ||
{ | ||
case ListSelectionMode.Multiple: | ||
if (SelectableItems.Contains(e.Item)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you set the SelectedItem
to null here?
break; | ||
|
||
case ListSelectionMode.Single: | ||
SelectableItems.Clear(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And clear the SelectedItems
here?
…mponents into 366-selecteditem-binding-is-not-working-in-list-view
In Android, it works as expected when the default selected item is set and shows the highlighted color. In Windows, it's not working as expected since Itemsource and templetedItems is null |
If selected item is preselecting with dynamic binding its not showing as selected item in UI.