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

Add support for footers to ListViewGroup #2653

Closed
hughbe opened this issue Jan 7, 2020 · 5 comments · Fixed by #2654
Closed

Add support for footers to ListViewGroup #2653

hughbe opened this issue Jan 7, 2020 · 5 comments · Fixed by #2654
Labels
api-approved (4) API was approved in API review, it can be implemented api-suggestion (1) Early API idea and discussion, it is NOT ready for implementation tenet-compatibility-OS Compatibility with OS features

Comments

@hughbe
Copy link
Contributor

hughbe commented Jan 7, 2020

  • You can set the LVGF_FOOTER flag on mask and set pszFooter to a valid string and cchFooter to the length of the string
  • You can set the LVGF_ALIGN flag on mask and set the uAlign to a valid LVGA_FOOTER_CENTER value

Proposed API

This would add the following APIs to ListViewGroup:

public class ListViewGroup
{
    ...
    public string Footer { get; set; }
    public HorizontalAlignment FooterAlignment { get; set; }
    ...
}

Example

var group = new ListViewGroup
{
     Footer = "NewFooter",
     FooterAlignment = HorizontalAlign.Center
};

image

@ghost ghost added the 🚧 work in progress Work that is current in progress label Jan 7, 2020
@RussKie RussKie added api-ready-for-review (2) API is ready for formal API review; applied by the issue owner api-suggestion (1) Early API idea and discussion, it is NOT ready for implementation design-discussion Ongoing discussion about design without consensus tenet-compatibility-OS Compatibility with OS features labels Jan 7, 2020
@RussKie
Copy link
Member

RussKie commented 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:

  • 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?

@RussKie RussKie added the 📭 waiting-author-feedback The team requires more information from the author label Jan 22, 2020
@merriemcgaw merriemcgaw added this to the 5.0 milestone Jan 23, 2020
@hughbe
Copy link
Contributor Author

hughbe commented Feb 7, 2020

Will VS Designer need to support the feature? If yes, describe how you expect it to function.

Yes. I would expect "Footer" and "FooterAlignment" to appear in the following editor (same as "Header" and "HeaderAlignment"
image

What impact will it have on accessibility?

I don't think ListViewGroups header is currently accessible at all? So I'm not really sure what we actually expect from accessibility here
image

Will this feature need to be localized or be localizable?

I would expect the user to need to localise the footer string, but I think (?) this is the responsibility of the user. Any documentation will need to be localized.

@weltkante
Copy link
Contributor

weltkante commented Feb 7, 2020

I would expect "Footer" and "FooterAlignment" to appear in the following editor (same as "Header" and "HeaderAlignment"

I would expect the user to need to localise the footer string

Probably both will just work by itself if the new properties are annotated correctly with metadata attributes. Since there is precedence with existing Header and HeaderAlignment the new properties would basically want the same treatment as the existing properties.

If VS feels the need to do anything special about the existing properties it would have to do the same for the new properties (ideally it shouldn't need to but you never know if VS designer puts an override onto a TypeDescriptor to implement some workaround or customized experience, like it does for example on Image properties where it overrides the default TypeDescriptor to provide a different selection dialog than someone would get outside VS, you can only know if you have access to the VS designer source).

@hughbe
Copy link
Contributor Author

hughbe commented Feb 7, 2020

In terms of accessibility, see #1726

@RussKie RussKie removed the 📭 waiting-author-feedback The team requires more information from the author label Feb 10, 2020
@terrajobst terrajobst added api-approved (4) API was approved in API review, it can be implemented and removed api-ready-for-review (2) API is ready for formal API review; applied by the issue owner labels Mar 5, 2020
@terrajobst
Copy link
Member

terrajobst commented Mar 5, 2020

Video

  • Looks good as proposed
namespace System.Windows.Forms
{
    public partial class ListViewGroup
    {
        public string Footer { get; set; }
        public HorizontalAlignment FooterAlignment { get; set; }
    }
}

@ghost ghost removed the 🚧 work in progress Work that is current in progress label Mar 10, 2020
@RussKie RussKie removed the design-discussion Ongoing discussion about design without consensus label Mar 10, 2020
@RussKie RussKie removed this from the 5.0 Preview 1- 4 milestone Apr 20, 2020
@dotnet dotnet locked as resolved and limited conversation to collaborators Feb 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api-approved (4) API was approved in API review, it can be implemented api-suggestion (1) Early API idea and discussion, it is NOT ready for implementation tenet-compatibility-OS Compatibility with OS features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants