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
api-approved(4) API was approved in API review, it can be implementedapi-suggestion(1) Early API idea and discussion, it is NOT ready for implementationtenet-compatibility-OSCompatibility with OS features
The team had some preliminary discussions about enhancing the control.
Could you spare few minutes and provide answers to the following questions so we can take it to the next level:
Will VS Designer need to support the feature? If yes, describe how you expect it to funсtion.
What impact will it have on accessibility?
Will this feature need to be localized or be localizable?
As a note, we have discussed whether we should continue using the established pattern of generating new types for event handlers (e.g. GroupLinkClickEventHandler) or use the "newer" pattern of generic handlers (i.e. EventHandler<T>).
It was resolved that where possible we should use the generic version to reduce the type bloat.
I've been looking at some documentation and I found some things that might be interesting that I would appreciate some input on: LVN_LINKCLICK and NMLVLINK structure.
I found that if the ListViewGroup task is clicked on then it is in fact a LVN_LINKCLICK notification code, but to my understanding this Task property is simply the name of the task and not the link itself. The NMLVLINK struture provides some extra information about the link itself that I don't think we necessarily care about since it seems like it's up to the user to do whatever they would like (trigger a link or not) once they get the callback from us.
With this info, I am wondering if we should trigger the GroupLink listeners under a regular HITTEST, where we will be checking to see if a group with a task was clicked on, or under this LVN_LINKCLICK notification code.
A downside I'm seeing with a regular HITTEST is that I cannot isolate the task from the group header, the HITTEST will simply register saying the group header was hit whereas LVN_LINKCLICK is able to make this distinction between the task and the rest of the header.
The downside I'm seeing with LVN_LINKCLICK is we would need to add extra classes because while we don't need the other information provided by NMLVLINK, we do need iSubItem, so that will require adding both NMLVLINK struct and LITEM struct. There might be some other things I'm not aware of.
I think making the distinction between the header and the task itself is important so I think LVN_LINKCLICK is the way to go, but @JeremyKuhne@hughbe@weltkante I'd love to hear your thoughts on this as well. 🙂
In my local implementation I went with the LVN_LINKCLICK. Although this would add more structs to the internal interop, this is no harm - they're not exposed and relatively simple.
I think making the distinction between the header and the task itself is important so I think LVN_LINKCLICK is the way to go
// Licensed to the .NET Foundation under one or more agreements.// The .NET Foundation licenses this file to you under the MIT license.// See the LICENSE file in the project root for more information.internalstaticpartialclassInterop{internalstaticpartialclassComCtl32{publicstructNMLVLINK{publicUser32.NMHDRnmhdr;publicLITEMlink;publicintiItem;publicintiSubItem;}}}
// Licensed to the .NET Foundation under one or more agreements.// The .NET Foundation licenses this file to you under the MIT license.// See the LICENSE file in the project root for more information.internalstaticpartialclassInterop{internalstaticpartialclassComCtl32{publicunsafestructLITEM{privateconstintMAX_LINKID_TEXT=48;privateconstintL_MAX_URL_LENGTH=2048+32+3;publicLIFmask;publicintiLink;publicLISstate;publicLISstateMask;publicfixedcharszID[MAX_LINKID_TEXT];publicfixedcharszUrl[L_MAX_URL_LENGTH];}}}
// Licensed to the .NET Foundation under one or more agreements.// The .NET Foundation licenses this file to you under the MIT license.// See the LICENSE file in the project root for more information.usingSystem;internalstaticpartialclassInterop{internalstaticpartialclassComCtl32{[Flags]publicenumLIF:uint{ITEMINDEX=0x00000001,STATE=0x00000002,ITEMID=0x00000004,URL=0x00000008,}}}
// Licensed to the .NET Foundation under one or more agreements.// The .NET Foundation licenses this file to you under the MIT license.// See the LICENSE file in the project root for more information.usingSystem;internalstaticpartialclassInterop{internalstaticpartialclassComCtl32{[Flags]publicenumLIS:uint{FOCUSED=0x00000001,ENABLED=0x00000002,VISITED=0x00000004,HOTTRACK=0x00000008,DEFAULTCOLORS=0x00000010,}}}
Reacted by Tobias Käs, Jeremy Kuhne, Loni Tra and Merrie McGaw
api-approved(4) API was approved in API review, it can be implementedapi-suggestion(1) Early API idea and discussion, it is NOT ready for implementationtenet-compatibility-OSCompatibility with OS features
Activity
RussKie commentedon Jan 22, 2020
The team had some preliminary discussions about enhancing the control.
Could you spare few minutes and provide answers to the following questions so we can take it to the next level:
terrajobst commentedon Mar 5, 2020
Video
EventHandler<T>IsResolvedGroupLinkthe best name for the concept? Or is it some kind of index? If so, the name should reflect that.RussKie commentedon Mar 9, 2020
As a note, we have discussed whether we should continue using the established pattern of generating new types for event handlers (e.g.
GroupLinkClickEventHandler) or use the "newer" pattern of generic handlers (i.e.EventHandler<T>).It was resolved that where possible we should use the generic version to reduce the type bloat.
weltkante commentedon Mar 24, 2020
15 remaining items
RussKie commentedon May 11, 2020
Thank you, I have updated @terrajobst's code snippet.
lonitra commentedon May 14, 2020
I've been looking at some documentation and I found some things that might be interesting that I would appreciate some input on: LVN_LINKCLICK and NMLVLINK structure.
I found that if the ListViewGroup task is clicked on then it is in fact a
LVN_LINKCLICKnotification code, but to my understanding thisTaskproperty is simply the name of the task and not the link itself. TheNMLVLINKstruture provides some extra information about the link itself that I don't think we necessarily care about since it seems like it's up to the user to do whatever they would like (trigger a link or not) once they get the callback from us.With this info, I am wondering if we should trigger the GroupLink listeners under a regular
HITTEST, where we will be checking to see if a group with a task was clicked on, or under thisLVN_LINKCLICKnotification code.A downside I'm seeing with a regular
HITTESTis that I cannot isolate the task from the group header, theHITTESTwill simply register saying the group header was hit whereasLVN_LINKCLICKis able to make this distinction between the task and the rest of the header.The downside I'm seeing with
LVN_LINKCLICKis we would need to add extra classes because while we don't need the other information provided byNMLVLINK, we do neediSubItem, so that will require adding bothNMLVLINKstruct andLITEMstruct. There might be some other things I'm not aware of.I think making the distinction between the header and the task itself is important so I think
LVN_LINKCLICKis the way to go, but @JeremyKuhne @hughbe @weltkante I'd love to hear your thoughts on this as well. 🙂hughbe commentedon May 14, 2020
In my local implementation I went with the
LVN_LINKCLICK. Although this would add more structs to the internal interop, this is no harm - they're not exposed and relatively simple.I agree
Example
LVN_CLICKEDinWndProcJeremyKuhne commentedon May 14, 2020
I agree as well