File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2424 <Compile Include =" $(MSBuildThisFileDirectory)Attributes\PackageProjectUrlAttribute.cs" />
2525 <Compile Include =" $(MSBuildThisFileDirectory)Behaviors\NavigateToUriAction.cs" />
2626 <Compile Include =" $(MSBuildThisFileDirectory)Controls\TitleBar\TitleBar.cs" />
27+ <Compile Include =" $(MSBuildThisFileDirectory)Converters\StringToUriConverter.cs" />
2728 <Compile Include =" $(MSBuildThisFileDirectory)DocOrSampleTemplateSelector.cs" />
2829 <Compile Include =" $(MSBuildThisFileDirectory)Helpers\BackgroundHelper.cs" />
2930 <Compile Include =" $(MSBuildThisFileDirectory)Helpers\IconHelper.cs" />
Original file line number Diff line number Diff line change 1+ // Licensed to the .NET Foundation under one or more agreements.
2+ // The .NET Foundation licenses this file to you under the MIT license.
3+ // See the LICENSE file in the project root for more information.
4+
5+ namespace CommunityToolkit . App . Shared . Converters ;
6+
7+ public class StringToUriConverter : IValueConverter
8+ {
9+ public object Convert ( object value , Type targetType , object parameter , string language )
10+ {
11+ return new Uri ( "ms-appx:///SourceAssets/" + ( string ) value ) ;
12+ }
13+
14+ public object ConvertBack ( object value , Type targetType , object parameter , string language )
15+ {
16+ return value ;
17+ }
18+ }
Original file line number Diff line number Diff line change 55 xmlns : meta =" using:CommunityToolkit.Tooling.SampleGen.Metadata"
66 xmlns : win =" http://schemas.microsoft.com/winfx/2006/xaml/presentation" >
77
8+ <converters : StringToUriConverter x : Name =" stringToUriConverter" />
9+
810 <!-- Kind of not supported in Uno (at least directly like this) see https://github.com/unoplatform/uno/issues/7582 (and related root issue)
911 <Style x:Key="IndentedGridViewItemStyle"
1012 BasedOn="{StaticResource DefaultGridViewItemStyle}"
2123 </Grid .ColumnDefinitions>
2224 <Image Width =" 16" >
2325 <Image .Source>
24- <BitmapImage UriSource =" {Binding Icon}" DecodePixelHeight =" 16" DecodePixelWidth =" 16" />
26+ <BitmapImage DecodePixelHeight =" 16"
27+ DecodePixelWidth =" 16"
28+ UriSource =" {Binding Icon}" />
2529 </Image .Source>
2630 </Image >
2731 <TextBlock Grid.Column=" 1"
7276 VerticalAlignment =" Center"
7377 Stretch =" Uniform" >
7478 <Image .Source>
75- <BitmapImage UriSource =" {Binding Icon}" />
79+ <BitmapImage UriSource =" {Binding Icon, Converter={StaticResource stringToUriConverter} }" />
7680 </Image .Source>
7781 </Image >
7882 </Grid >
Original file line number Diff line number Diff line change 77using CommunityToolkit . Tooling . SampleGen . Metadata ;
88using Microsoft . CodeAnalysis ;
99using Microsoft . CodeAnalysis . Text ;
10+ using System . Collections . Immutable ;
1011using System . IO ;
1112
1213namespace CommunityToolkit . Tooling . SampleGen ;
@@ -85,8 +86,6 @@ private static void ReportDocumentDiagnostics(SourceProductionContext ctx, Dicti
8586
8687 private ImmutableArray < ToolkitFrontMatter > GatherDocumentFrontMatter ( SourceProductionContext ctx , IEnumerable < AdditionalText > data )
8788 {
88-
89- // System.Diagnostics.Debug
9089 return data . Select ( file =>
9190 {
9291 // We have to manually parse the YAML here for now because of
Original file line number Diff line number Diff line change @@ -71,5 +71,20 @@ public enum ToolkitSampleSubcategory : byte
7171 /// Samples that focus on XAML triggers.
7272 /// </summary>
7373 Triggers ,
74+
75+ /// <summary>
76+ /// Samples that focus on data helpers.
77+ /// </summary>
78+ Data ,
79+
80+ /// <summary>
81+ /// Samples that focus on system helpers.
82+ /// </summary>
83+ System ,
84+
85+ /// <summary>
86+ /// Samples that focus on helpers during development.
87+ /// </summary>
88+ Developer ,
7489}
7590
You can’t perform that action at this time.
0 commit comments