Skip to content

Commit ae176e0

Browse files
committed
Project template
1 parent db13e4f commit ae176e0

6 files changed

+7
-4
lines changed

template/lab/samples/ProjectTemplate.Samples/ProjectTemplateCustomSample.xaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
mc:Ignorable="d">
1010

1111
<StackPanel Spacing="15">
12+
<TextBlock Style="{StaticResource BodyStrongTextBlockStyle}"
13+
Text="{x:Bind TitleText, Mode=OneWay}" />
1214
<labs:ProjectTemplate Orientation="{x:Bind local:ProjectTemplateCustomSample.ConvertStringToOrientation(LayoutOrientation), Mode=OneWay}">
1315
<TextBlock Text="1" />
1416
<TextBlock Text="2" />

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ namespace ProjectTemplateExperiment.Samples;
77
/// <summary>
88
/// An example sample page of a custom control inheriting from Panel.
99
/// </summary>
10+
[ToolkitSampleTextOption("TitleText", "This is a title", Title = "Input the text")]
1011
[ToolkitSampleMultiChoiceOption("LayoutOrientation", "Horizontal", "Vertical", Title = "Orientation")]
1112

1213
[ToolkitSample(id: nameof(ProjectTemplateCustomSample), "Custom control", description: $"A sample for showing how to create and use a {nameof(ProjectTemplate)} custom control.")]

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace ProjectTemplateExperiment.Samples;
77
[ToolkitSampleBoolOption("IsTextVisible", true, Title = "IsVisible")]
88
// Single values without a colon are used for both label and value.
99
// To provide a different label for the value, separate with a colon surrounded by a single space on both sides ("label : value").
10-
[ToolkitSampleMultiChoiceOption("TextSize", "Small : 12", "Normal : 16", "Big : 32", Title = "Text size")]
10+
[ToolkitSampleNumericOption("TextSize", 12, 8, 48, 2, false, Title = "FontSize")]
1111
[ToolkitSampleMultiChoiceOption("TextFontFamily", "Segoe UI", "Arial", "Consolas", Title = "Font family")]
1212
[ToolkitSampleMultiChoiceOption("TextForeground", "Teal : #0ddc8c", "Sand : #e7a676", "Dull green : #5d7577", Title = "Text foreground")]
1313

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace ProjectTemplateExperiment.Samples;
77
[ToolkitSampleBoolOption("IsTextVisible", true, Title = "IsVisible")]
88
// Single values without a colon are used for both label and value.
99
// To provide a different label for the value, separate with a colon surrounded by a single space on both sides ("label : value").
10-
[ToolkitSampleMultiChoiceOption("TextSize", "Small : 12", "Normal : 16", "Big : 32", Title = "Text size")]
10+
[ToolkitSampleNumericOption("TextSize", 12, 8, 48, 2, true, Title = "FontSize")]
1111
[ToolkitSampleMultiChoiceOption("TextFontFamily", "Segoe UI", "Arial", "Consolas", Title = "Font family")]
1212
[ToolkitSampleMultiChoiceOption("TextForeground", "Teal : #0ddc8c", "Sand : #e7a676", "Dull green : #5d7577", Title = "Text foreground")]
1313

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace ProjectTemplateExperiment.Samples;
77
[ToolkitSampleBoolOption("IsTextVisible", true, Title = "IsVisible")]
88
// Single values without a colon are used for both label and value.
99
// To provide a different label for the value, separate with a colon surrounded by a single space on both sides ("label : value").
10-
[ToolkitSampleMultiChoiceOption("TextSize", "Small : 12", "Normal : 16", "Big : 32", Title = "Text size")]
10+
[ToolkitSampleNumericOption("TextSize", 12, 8, 48, 2, false, Title = "FontSize")]
1111
[ToolkitSampleMultiChoiceOption("TextFontFamily", "Segoe UI", "Arial", "Consolas", Title = "Font family")]
1212
[ToolkitSampleMultiChoiceOption("TextForeground", "Teal : #0ddc8c", "Sand : #e7a676", "Dull green : #5d7577", Title = "Text foreground")]
1313

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace ProjectTemplateExperiment.Samples;
77
[ToolkitSampleBoolOption("IsTextVisible", true, Title = "IsVisible")]
88
// Single values without a colon are used for both label and value.
99
// To provide a different label for the value, separate with a colon surrounded by a single space on both sides ("label : value").
10-
[ToolkitSampleMultiChoiceOption("TextSize", "Small : 12", "Normal : 16", "Big : 32", Title = "Text size")]
10+
[ToolkitSampleNumericOption("TextSize", 12, 8, 48, 2, true, Title = "FontSize")]
1111
[ToolkitSampleMultiChoiceOption("TextFontFamily", "Segoe UI", "Arial", "Consolas", Title = "Font family")]
1212
[ToolkitSampleMultiChoiceOption("TextForeground", "Teal : #0ddc8c", "Sand : #e7a676", "Dull green : #5d7577", Title = "Text foreground")]
1313

0 commit comments

Comments
 (0)