Skip to content
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

Added ListSelector control. #1

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

JsanchezCynoss
Copy link
Collaborator

@JsanchezCynoss JsanchezCynoss commented Oct 29, 2024

Improved ListSelector control, with options to change Available/Selected header names.

@jgonzalez-stw jgonzalez-stw changed the base branch from main to develop October 31, 2024 11:51
@jgonzalez-stw jgonzalez-stw self-requested a review October 31, 2024 11:51
@@ -177,18 +217,18 @@ private void SelectedListBox_OnMouseDoubleClick( object sender, MouseButtonEvent

private static void OnAvailableItemsSourcePropertyChangedEvent( DependencyObject d, DependencyPropertyChangedEventArgs e )
{
( (ListSelector) d ).OnAvailableItemsSourcePropertyChangedEvent( (IEnumerable) e.OldValue, (IEnumerable) e.NewValue );
( (ListSelector) d ).OnAvailableItemsSourcePropertyChangedEvent( (IEnumerable) e.OldValue, (IEnumerable?) e.NewValue );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point in taking in account that e.NewValue may be null, but this should be also be considered for e.OldValue.

In fact, just handling nulls in the called function should be enough, maybe the (IEnumerable?) cast here is unnecessary.

Copy link
Collaborator Author

@JsanchezCynoss JsanchezCynoss Nov 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary cast has been removed and handled only in the call, also for OldValue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants