From a92363fc3c6c26cbcff9e19bc6dc1650aefab2fb Mon Sep 17 00:00:00 2001 From: DevTKSS Date: Wed, 8 Jan 2025 00:05:22 +0100 Subject: [PATCH] docs(CTK): formatting and spellchecking on Converters pages --- doc/articles/uno-community-toolkit-v8.md | 84 ++- .../DateTimePatternParser/PatternNodes.cs | 429 +++++++++++ .../DateTimePatternParser/PatternParser.cs | 514 +++++++++++++ .../DateTimeTemplateParser/TemplateNodes.cs | 574 +++++++++++++++ .../DateTimeTemplateParser/TemplateParser.cs | 674 ++++++++++++++++++ .../DateTimeFormatting/TimeZoneFormat.cs | 9 + .../Helpers/StartStopDelegateWrapper.cs | 90 +++ .../Helpers/StartStopTypedEventWrapper.cs | 35 + 8 files changed, 2365 insertions(+), 44 deletions(-) create mode 100644 src/Uno.UWP/Globalization/DateTimeFormatting/DateTimePatternParser/PatternNodes.cs create mode 100644 src/Uno.UWP/Globalization/DateTimeFormatting/DateTimePatternParser/PatternParser.cs create mode 100644 src/Uno.UWP/Globalization/DateTimeFormatting/DateTimeTemplateParser/TemplateNodes.cs create mode 100644 src/Uno.UWP/Globalization/DateTimeFormatting/DateTimeTemplateParser/TemplateParser.cs create mode 100644 src/Uno.UWP/Globalization/DateTimeFormatting/TimeZoneFormat.cs create mode 100644 src/Uno.UWP/Helpers/StartStopDelegateWrapper.cs create mode 100644 src/Uno.UWP/Helpers/StartStopTypedEventWrapper.cs diff --git a/doc/articles/uno-community-toolkit-v8.md b/doc/articles/uno-community-toolkit-v8.md index 490aa255adc6..68ed72673e97 100644 --- a/doc/articles/uno-community-toolkit-v8.md +++ b/doc/articles/uno-community-toolkit-v8.md @@ -186,7 +186,7 @@ A complete working sample, along with additional examples, is available on GitHu ## Using Non-UI Elements from the CommunityToolkit: Converters -The CommunityToolkit is providing some ready-to-use Converters for e.g. x:Bind in Xaml, whithout having to write already existing basic Converters yourself. +The CommunityToolkit is providing some ready-to-use Converters for e.g. x:Bind in Xaml, whithout having to write already existing basic Converters yourself. [List of CommunityToolkit Converters | Windows Toolkit Documentation](https://learn.microsoft.com/en-us/dotnet/communitytoolkit/windows/converters/) The implementation of those are quite similar to the example of the SettingsControl above, but there are small adjustments to be done to use them: @@ -194,15 +194,15 @@ The implementation of those are quite similar to the example of the SettingsCont 1. Import of the Package Change this: - + ```CommunityToolkit.WinUI.Controls.SettingsControls``` - + to Converters namespace: ```CommunityToolkit.WinUI.Converters``` while the Version will stay the same as above. - + 1. Add the related needed namespace(s) > [!NOTE] @@ -218,65 +218,61 @@ The implementation of those are quite similar to the example of the SettingsCont In case you are developing a App that's using C# Markup and you want to use the Converters, you can now switch to [C#-Markup Converters](https://platform.uno/docs/articles/external/uno.extensions/doc/Learn/Markup/Converters.html) Documentation for future Usage Guide, the general Import is done from here on. - 1. Xaml Definition - -Important Difference to the previous seen SettingsCard Control Example, a Non-UI Converter has to be imported to the Page.Ressources Section to StaticRessources like this for using it, since there is no single Namespace per Converter like on the Controls: +1. Xaml Definition + +Important Difference to the previous seen SettingsCard Control Example, a Non-UI Converter has to be imported to the Page.Resources Section to StaticResources like this for using it, since there is no single Namespace per Converter like on the Controls: ### [Example StringToVisibilityConverter](#tab/string-visible-conv) StringToVisibilityConverter is a Converter that has to be bound to a String typed Property and will return a Visibility State. - ``` - - - - ``` +```xml + + + +``` Somewhere in your Page Content: - - ```xml - -