diff --git a/CommunityToolkit.App.Shared/Renderers/ToolkitSampleRenderer.xaml b/CommunityToolkit.App.Shared/Renderers/ToolkitSampleRenderer.xaml index ae64da00..42add5e2 100644 --- a/CommunityToolkit.App.Shared/Renderers/ToolkitSampleRenderer.xaml +++ b/CommunityToolkit.App.Shared/Renderers/ToolkitSampleRenderer.xaml @@ -1,4 +1,4 @@ - + + mc:Ignorable="d wasm not_win"> @@ -62,7 +64,6 @@ - @@ -150,7 +151,6 @@ Click="FlowDirectionBtn_OnClick" Style="{StaticResource SubtleButtonStyle}" ToolTipService.ToolTip="Toggle right-to-left"> - - + HorizontalAlignment="Stretch" + HorizontalContentAlignment="Stretch"> 14 - + + + + - + + + + diff --git a/CommunityToolkit.App.Shared/Renderers/ToolkitSampleRenderer.xaml.cs b/CommunityToolkit.App.Shared/Renderers/ToolkitSampleRenderer.xaml.cs index d5f635c0..60e2a78b 100644 --- a/CommunityToolkit.App.Shared/Renderers/ToolkitSampleRenderer.xaml.cs +++ b/CommunityToolkit.App.Shared/Renderers/ToolkitSampleRenderer.xaml.cs @@ -2,10 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using CommunityToolkit.Tooling.SampleGen.Attributes; +#if !HAS_UNO +using ColorCode; +#endif using CommunityToolkit.Tooling.SampleGen.Metadata; -using System.Runtime.InteropServices.WindowsRuntime; -using Windows.Foundation.Collections; using Windows.Storage; #if WINAPPSDK @@ -152,8 +152,31 @@ private async Task LoadData() return; } - XamlCode = await GetMetadataFileContents(Metadata, "xaml"); - CSharpCode = await GetMetadataFileContents(Metadata, "xaml.cs"); + XamlCode = (await GetMetadataFileContents(Metadata, "xaml"))?.Trim(); + CSharpCode = (await GetMetadataFileContents(Metadata, "xaml.cs"))?.Trim(); + + // Remove Header License Comments from code samples for space + if (XamlCode?.StartsWith("