api-suggestionarea-controls-ListViewhelp wantedinvestigatetenet-compatibility-OS
Metriche repository
- Star
- (4100 star)
- Metriche merge PR
- (Merge medio 14g 22h) (56 PR mergiate in 30 g)
Descrizione
State of Play
- Currently,
ListViewGrouponly supportsHeaderandHeaderAlignment(although this is buggy, see #2555) - Our definition of
LVGROUPWis actually too small: LVGROUP actually exposes a lot more functionality (https://docs.microsoft.com/en-us/windows/win32/api/commctrl/ns-commctrl-lvgroup)
Missing Feature Parity
- See http://www.componentowl.com/better-listview.html
- See https://www.codeproject.com/Articles/16009/A-Much-Easier-to-Use-ListView-2
- See https://msdn.microsoft.com/en-gb/msdnmag/issues/07/08/WindowsCPP/default.aspx
Support For Images
- You can set the
LVSIL_GROUPHEADERlist view image list - You can set the
LVGF_TITLEIMAGEflag onmaskand setiTitleImageto a valid index into theLVSIL_GROUPHEADERimage list
This would add the following APIs to ListView and ListViewGroup:
public class ListView
{
...
public ImageList GroupHeaderImageList { get; set; }
...
}
public class ListViewGroup
{
...
public int TitleImageIndex { get; set; }
...
}
E.g.

Collapsible
- Can set the
LVGF_STATEflag onuMaskand setstateMasktoLVGS_COLLAPSIBLEandstatetoLVGS_COLLAPSIBLE - https://www.codeproject.com/Articles/31276/Add-Group-Collapse-Behavior-on-a-Listview-Control
This would add the following APIs to ListViewGroup:
public class ListViewGroup
{
...
public bool Collapsible { get; set; }
...
}
E.g.

Discussion
- The rightmost collapse/expand icon doesn't work: to fix this we need to call
base.WndProcinWM_LBUTTONUPhandler
Collapsed
- Can set the
LVGF_STATEflag onuMaskand setstateMasktoLVGS_COLLAPSEDandstatetoLVGS_COLLAPSED
This would add the following APIs to ListViewGroup:
public class ListViewGroup
{
...
public bool Collapsed { get; set; }
...
}
E.g.

HeaderVisible
- Can set the
LVGF_STATEflag onuMaskand setstateMasktoLVGS_NOHEADERandstatetoLVGS_NOHEADER
This would add the following APIs to ListViewGroup:
public class ListViewGroup
{
...
public bool HeaderVisible { get; set; } = true;
...
}
E.g.

Description Top/Bottom
- You can set the
LVGF_DESCRIPTIONTOPflag onmaskand setpszDescriptionTopto a valid string andcchDescriptionTopto the length of the string - You can set the
LVGF_DESCRIPTIONBOTTOMflag onmaskand setpszDescriptionBottomto a valid string andcchDescriptionBottomto the length of the string
This would add the following APIs to ListViewGroup:
public class ListViewGroup
{
...
public string TopDescription { get; set; }
public string BottomDescription { get; set; }
...
}
E.g.

/cc @weltkante @RussKie