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

Improvement Request: Item containers and templates - confusing #2785

Open
SetTrend opened this issue Nov 1, 2020 · 0 comments
Open

Improvement Request: Item containers and templates - confusing #2785

SetTrend opened this issue Nov 1, 2020 · 0 comments
Assignees
Labels
design/tech doc-bug feedback is about something that is out of date, unclear, confusing, or broken in the article Pri2 uwp/prod

Comments

@SetTrend
Copy link

SetTrend commented Nov 1, 2020

After reading this page I have a strong feeling that the "Introduction to customization" chapter needs improvement because it's mixing up a template object with a structural design concept, and it's not clearly identifying or distinguishing between both.

ItemContainer

What I see missing in the text depicted by the above screenshot:

  1. "The control template provides [...]"

    There is no such thing like a control template available to the programmer. It's (supposedly) an intrinsic wrapper component being automatically added by WinRT as a parent of a 'DataTemplate' component. But that sort of information is not coming clear from the information in the bullet list.

  2. "You can use the ItemContainerStyle property [...]"

    You can use? What are the alternatives then?

    This sentence should state clearly that a ListView's ItemContainerStyle properties get forwarded to the intrinsic wrapper component, called "control template".

  3. The naming is misleading. A "control template" may be feast of famine.

    I suggest to revise the name. "Item Container" may be feasible, given that the corresponding ListView style property is called ItemContainerStyle.

    As there supposedly is no such thing like a ControlTemplate component publicly available, this item seems a document issue to me, too.

  4. Is propose it should get clear from the documentation that two different wrappers exist around each of the list items just for one single purpose: the purpose of being able to distribute styling among two different "hooks", so styling can be eased when creating styles for a number of ListViews in an app. One set of styles addresses the DataTemplate object while the other set of styles addresses the wrapper object created and addressed by the ListView/GridView's ItemContainerStyle component; in combination these two sets of styles can then easily be intermixed.

  5. "This image shows how the control template and the data template combine [...]"

    Frankly, this image (like seen in the screenshot above) doesn't show anything. It merely shows a green and a yellow row getting intermixed. It isn't even annotated, so it doesn't get clear what the green row refers to, or what the yellow row refers to.

    For this item, I propose to replace the image with meaningful content, similar to the following one (the annotations I used are just placeholders; you'll probably find better text annotations, explaining what the different parts in a ListView or GridView are):

    ListViewItemContainer


I created the above animation using SVG, so it may be easily added to the documenation. Here's the source:

ListViewItem-Struktur-Animation (SVG).zip


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

@hkhmsft hkhmsft added the doc-bug feedback is about something that is out of date, unclear, confusing, or broken in the article label Nov 11, 2020
QuinnRadich pushed a commit that referenced this issue Aug 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design/tech doc-bug feedback is about something that is out of date, unclear, confusing, or broken in the article Pri2 uwp/prod
Projects
None yet
Development

No branches or pull requests

4 participants