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

ListView: add support for multi-line items #1543

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

Conversation

migueldeicaza-msft
Copy link

Better version that supports multi-line ListView items.

In this example, a custom renderer draws two-line items, and requires ListView.ItemHeight to be set to 2:

image

@migueldeicaza-msft
Copy link
Author

Observation: perhaps we could make it so that ListWrapper has support for rendering multi-line text, so that folks do not need to implement a custom renderer for simple scenarios.

The RenderUstr could look for '\n' and use that to wrap around the text.

@cssmismi
Copy link

In the demo picture above, after selecting C: and hitting the up arrow, the contents of the lists changes and only 1 ListView item is visible.

Copy link
Collaborator

@tig tig left a comment

Choose a reason for hiding this comment

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

This is great.

All new features require two things missing from this PR though:

  1. Unit tests
  2. Sample code in a Scenario in UI Catalog. We are trying to deprecate demo.cs as it unstructured and doesn't scale as a way to discover samples.

Thanks.

@tig
Copy link
Collaborator

tig commented Mar 3, 2022

@migueldeicaza now that you have tons of time on your hands 😉, wanna look at the changes requested here so we can merge this?

@tig
Copy link
Collaborator

tig commented Apr 17, 2022

@migueldeicaza now that you have tons of time on your hands 😉, wanna look at the changes requested here so we can merge this?

I can't merge this until the requested changes are made...

@tig
Copy link
Collaborator

tig commented May 7, 2022

@migueldeicaza now that you have tons of time on your hands 😉, wanna look at the changes requested here so we can merge this?

I can't merge this until the requested changes are made...

@migueldeicaza - what's the chance you'll be able to address this anytime soon? Would you prefer one of the other maintainers take it on? I'd like to get this merged!

@migueldeicaza
Copy link
Collaborator

Happy to let someone look at it. I need to setup a .net development system again :-)

@tig
Copy link
Collaborator

tig commented May 7, 2022

Happy to let someone look at it. I need to setup a .net development system again :-)

I understand. I'll see if I can dive into this today.

@tig
Copy link
Collaborator

tig commented May 7, 2022

Dug in a little and this PR is far from ready:

  • Issue @cssmismi pointed out above about selecting last item in list causing weird scroll behavior
  • Demo code does not exercise code enuf to know it's all working. E.g. only 3 items and no scrolling. Are we sure scrolling is working?
  • Mouse selection doesn't work right
  • Needs demo code moved to a UI Catalog scenario
  • No new unit tests

I'm going to mark this PR as draft. Hopefully myself or someone will find the time to address it.

@tig tig marked this pull request as draft May 7, 2022 15:46
@BDisp
Copy link
Collaborator

BDisp commented Aug 31, 2022

For now I have this like the image bellow but I want to add more features, like header, multi-columns, column alignment and row alignment.

listview-multine-feature

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.

None yet

5 participants