Skip to content

Commit 2dc79b1

Browse files
committed
Fix
1 parent 81b5401 commit 2dc79b1

File tree

5 files changed

+5
-21
lines changed

5 files changed

+5
-21
lines changed

common/CommunityToolkit.Labs.Core.SourceGenerators/ToolkitSampleMetadataGenerator.Sample.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ private static IEnumerable<string> BuildNewGeneratedSampleOptionMetadataSource(T
287287
{
288288
if (item is ToolkitSampleMultiChoiceOptionAttribute multiChoiceAttr)
289289
{
290-
yield return $@"new {typeof(ToolkitSampleMultiChoiceOptionMetadataViewModel).FullName}(name: ""{item.Name}"", options: new[] {{ {string.Join(",", multiChoiceAttr.Choices.Select(x => $@"new {typeof(MultiChoiceOption).FullName}(""{x.Label}"", ""{x.Value}"")").ToArray())} }}, title: ""{item.Title}"")";
290+
yield return $@"new {typeof(ToolkitSampleMultiChoiceOptionMetadataViewModel).FullName}(name: ""{multiChoiceAttr.Name}"", options: new[] {{ {string.Join(",", multiChoiceAttr.Choices.Select(x => $@"new {typeof(MultiChoiceOption).FullName}(""{x.Label}"", ""{x.Value}"")").ToArray())} }}, title: ""{multiChoiceAttr.Title}"")";
291291
}
292292
else if (item is ToolkitSampleBoolOptionAttribute boolAttribute)
293293
{

template/lab/samples/ProjectTemplate.Samples/ProjectTemplateTemplatedSample.xaml.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,7 @@ namespace ProjectTemplateExperiment.Samples;
99
// To provide a different label for the value, separate with a colon surrounded by a single space on both sides ("label : value").
1010
[ToolkitSampleMultiChoiceOption("TextSize", "Small : 12", "Normal : 16", "Big : 32", Title = "Text size")]
1111
[ToolkitSampleMultiChoiceOption("TextFontFamily", "Segoe UI", "Arial", "Consolas", Title = "Font family")]
12-
[ToolkitSampleMultiChoiceOption("TextForeground",
13-
"Teal : #0ddc8c",
14-
"Sand : #e7a676",
15-
"Dull green : #5d7577",
16-
Title = "Text foreground")]
12+
[ToolkitSampleMultiChoiceOption("TextForeground", "Teal : #0ddc8c", "Sand : #e7a676", "Dull green : #5d7577", Title = "Text foreground")]
1713

1814
[ToolkitSample(id: nameof(ProjectTemplateTemplatedSample), "Templated control", description: "A sample for showing how to create and use a templated control.")]
1915
public sealed partial class ProjectTemplateTemplatedSample : Page

template/lab/samples/ProjectTemplate.Samples/ProjectTemplateTemplatedStyleCustomSample.xaml.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,7 @@ namespace ProjectTemplateExperiment.Samples;
99
// To provide a different label for the value, separate with a colon surrounded by a single space on both sides ("label : value").
1010
[ToolkitSampleMultiChoiceOption("TextSize", "Small : 12", "Normal : 16", "Big : 32", Title = "Text size")]
1111
[ToolkitSampleMultiChoiceOption("TextFontFamily", "Segoe UI", "Arial", "Consolas", Title = "Font family")]
12-
[ToolkitSampleMultiChoiceOption("TextForeground",
13-
"Teal : #0ddc8c",
14-
"Sand : #e7a676",
15-
"Dull green : #5d7577",
16-
Title = "Text foreground")]
12+
[ToolkitSampleMultiChoiceOption("TextForeground", "Teal : #0ddc8c", "Sand : #e7a676", "Dull green : #5d7577", Title = "Text foreground")]
1713

1814
[ToolkitSample(id: nameof(ProjectTemplateTemplatedStyleCustomSample), "Templated control (restyled)", description: "A sample for showing how to create a use and templated control with a custom style.")]
1915
public sealed partial class ProjectTemplateTemplatedStyleCustomSample : Page

template/lab/samples/ProjectTemplate.Samples/ProjectTemplateXbindBackedSample.xaml.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,7 @@ namespace ProjectTemplateExperiment.Samples;
99
// To provide a different label for the value, separate with a colon surrounded by a single space on both sides ("label : value").
1010
[ToolkitSampleMultiChoiceOption("TextSize", "Small : 12", "Normal : 16", "Big : 32", Title = "Text size")]
1111
[ToolkitSampleMultiChoiceOption("TextFontFamily", "Segoe UI", "Arial", "Consolas", Title = "Font family")]
12-
[ToolkitSampleMultiChoiceOption("TextForeground",
13-
"Teal : #0ddc8c",
14-
"Sand : #e7a676",
15-
"Dull green : #5d7577",)]
16-
Title = "Text foreground"
12+
[ToolkitSampleMultiChoiceOption("TextForeground", "Teal : #0ddc8c", "Sand : #e7a676", "Dull green : #5d7577", Title = "Text foreground")]
1713

1814
[ToolkitSample(id: nameof(ProjectTemplateXbindBackedSample), "Backed templated control", description: "A sample for showing how to create and use a templated control with a backed resource dictionary.")]
1915
public sealed partial class ProjectTemplateXbindBackedSample : Page

template/lab/samples/ProjectTemplate.Samples/ProjectTemplateXbindBackedStyleCustomSample.xaml.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,7 @@ namespace ProjectTemplateExperiment.Samples;
99
// To provide a different label for the value, separate with a colon surrounded by a single space on both sides ("label : value").
1010
[ToolkitSampleMultiChoiceOption("TextSize", "Small : 12", "Normal : 16", "Big : 32", Title = "Text size")]
1111
[ToolkitSampleMultiChoiceOption("TextFontFamily", "Segoe UI", "Arial", "Consolas", Title = "Font family")]
12-
[ToolkitSampleMultiChoiceOption("TextForeground",
13-
"Teal : #0ddc8c",
14-
"Sand : #e7a676",
15-
"Dull green : #5d7577",
16-
Title = "Text foreground")]
12+
[ToolkitSampleMultiChoiceOption("TextForeground", "Teal : #0ddc8c", "Sand : #e7a676", "Dull green : #5d7577", Title = "Text foreground")]
1713

1814
[ToolkitSample(id: nameof(ProjectTemplateXbindBackedStyleCustomSample), "Backed templated control (restyled)", description: "A sample for showing how to create and use a templated control with a backed resource dictionary and a custom style.")]
1915
public sealed partial class ProjectTemplateXbindBackedStyleCustomSample : Page

0 commit comments

Comments
 (0)