MicrosoftDocs / CommunityToolkit

The Official Docs for the Community Toolkits
https://learn.microsoft.com/dotnet/communitytoolkit
Creative Commons Attribution 4.0 International
109 stars 90 forks source link

The `DynamicResources` code sample is incorrect #439

Open egvijayanand opened 3 months ago

egvijayanand commented 3 months ago

Type of issue

Code doesn't work

Description

The DynamicResources code sample is incorrect.

Here is the updated code sample, it's a Tuple, so it should be enclosed within parentheses.

new Label().DynamicResources((Label.TextColorProperty, "TextColor"), 
                                (Label.FontFamilyProperty, "FontFamily"));

Page URL

https://learn.microsoft.com/en-us/dotnet/communitytoolkit/maui/markup/extensions/dynamic-resource-handler-extensions

Content source URL

https://github.com/MicrosoftDocs/CommunityToolkit/blob/main/docs/maui/markup/extensions/dynamic-resource-handler-extensions.md

Document Version Independent Id

b1bcba50-4c74-adc4-9f15-b989dcaced01

Article author

@brminnick

Metadata

brminnick commented 3 months ago

Thanks Vijay!

Could you submit a quick PR to fix it? I actually don't have admin rights on the docs, but we can get Gerald to merge it 💯