CommunityToolkit icon indicating copy to clipboard operation
CommunityToolkit copied to clipboard

Seems the ItemsSource and EmptyView code sample is misinterpreted

Open egvijayanand opened this issue 10 months ago • 3 comments

Type of issue

Other (describe below)

Description

Seems the ItemsSource and EmptyView code sample is misinterpreted Please check once again.

Page URL

https://learn.microsoft.com/en-us/dotnet/communitytoolkit/maui/markup/extensions/bindable-layout-extensions

Content source URL

https://github.com/MicrosoftDocs/CommunityToolkit/blob/main/docs/maui/markup/extensions/bindable-layout-extensions.md

Document Version Independent Id

3b88c5af-9ceb-abde-2dc7-2daa1e8e50ea

Article author

@brminnick

Metadata

  • ID: 3b88c5af-9ceb-abde-2dc7-2daa1e8e50ea
  • Service: dotnet-communitytoolkit
  • Sub-service: dotnet-maui-community-toolkit

egvijayanand avatar Mar 25 '24 13:03 egvijayanand

Why do you think its misinterpreted? Can you maybe explain a bit more?

jfversluis avatar May 08 '24 08:05 jfversluis

Here is the signature of the ItemsSource method, it takes an IEnumerable as its input but the code sample mentions a label (same as the empty view sample).

public static TLayout ItemsSource<TLayout>(this TLayout layout, IEnumerable source) where TLayout : BindableObject, ILayout {}

For more details, go through the description of the ItemsSource and ItemTemplate sections on that page.

egvijayanand avatar May 09 '24 17:05 egvijayanand

Oh I see it looks like we have a copy/paste issue. Thanks I'll sort that

bijington avatar May 09 '24 18:05 bijington