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

DragItemsStartingEventArgs is sealed and doesn't provide public constructor #5475

Open
hawkerm opened this issue Jul 15, 2021 · 3 comments
Open
Labels
area-Lists ListView, GridView, ListBox, etc feature proposal New feature proposal product-winui3 WinUI 3 issues team-Controls Issue for the Controls team wct

Comments

@hawkerm
Copy link

hawkerm commented Jul 15, 2021

Describe the bug
This is the most recent example I have, but all the EventArgs classes being sealed and not having constructors is a big problem when trying to implement custom controls which follow the same API interface as built-in controls.

I'd like to re-use the DragItemsStartingEventArgs to implement my own pair of DragItemsStarting/Completed events on a custom view control which allows its items to be dragged.

However, I can't use the same delegate and events as ListViewBase as the event args class DragItemsStartingEventArgs is sealed and therefore I can't set the properties on it as there's no constructor with parameters.

Expected behavior
Able to use built-in event args classes and delegates to create controls with matching APIs to built-in controls.

Version Info
WUX 19042 (but looks according to docs this is still the case in WinUI 3)

Windows 10 version Saw the problem?
Insider Build (xxxxx)
October 2020 Update (19042) Yes
May 2020 Update (19041)
November 2019 Update (18363)
May 2019 Update (18362)
October 2018 Update (17763)
April 2018 Update (17134)
Fall Creators Update (16299)
Creators Update (15063)
Device form factor Saw the problem?
Desktop Yes
Xbox
Surface Hub
IoT

Additional context
Related to #780

@ghost ghost added the needs-triage Issue needs to be triaged by the area owners label Jul 15, 2021
@hawkerm
Copy link
Author

hawkerm commented Jul 15, 2021

I also can't as easily use the underlying DragStartingEventArgs and DropCompletedEvents as easily either, as OriginalSource is set only and I guess generally set by the ListViewBase class?

@StephenLPeters
Copy link
Contributor

@MikeHillberg seems like a good candidate to unseal?

@chrisglein chrisglein added feature proposal New feature proposal area-Lists ListView, GridView, ListBox, etc and removed needs-triage Issue needs to be triaged by the area owners labels Jul 20, 2021
@hawkerm
Copy link
Author

hawkerm commented Jul 25, 2021

KeyRoutedEventArgs is the same (as pretty much every event args class).

@bpulliam bpulliam added team-Controls Issue for the Controls team and removed team-Framework labels Aug 22, 2023
@microsoft-github-policy-service microsoft-github-policy-service bot added the needs-triage Issue needs to be triaged by the area owners label Aug 22, 2023
@bpulliam bpulliam removed the needs-triage Issue needs to be triaged by the area owners label Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Lists ListView, GridView, ListBox, etc feature proposal New feature proposal product-winui3 WinUI 3 issues team-Controls Issue for the Controls team wct
Projects
None yet
Development

No branches or pull requests

5 participants