From af4a7c30e105e28179745bee2f1f6be733aa9fde Mon Sep 17 00:00:00 2001 From: agneszitte Date: Mon, 3 Jun 2024 11:20:39 -0400 Subject: [PATCH] docs: Align code snippet blocks syntax to follow docfx and microsoft related documentation (cherry picked from commit e544b2789836c61a974ffb3c232d3fc9b7788b38) --- doc/ReleaseNotes/LegacyReleaseNotes.md | 2 +- doc/articles/features/ElevatedView.md | 2 +- doc/articles/features/Lottie.md | 4 ++-- doc/articles/features/applicationdata.md | 2 +- doc/articles/features/custom-fonts.md | 4 ++-- doc/articles/features/routed-events.md | 4 ++-- .../features/web-authentication-broker.md | 10 ++++---- doc/articles/guides/open-id-connect.md | 2 +- doc/articles/interop/MSAL.md | 4 ++-- doc/articles/interop/wasm-javascript-1.md | 24 +++++++++---------- doc/articles/interop/wasm-javascript-2.md | 8 +++---- doc/articles/interop/wasm-javascript-3.md | 14 +++++------ doc/articles/signalr.md | 4 ++-- doc/articles/splash-screen.md | 2 +- .../uno-development/building-uno-macos.md | 2 +- .../troubleshooting-memory-issues.md | 2 +- doc/articles/wasm-custom-events.md | 4 ++-- doc/blog/201808-UnoUnderTheHoodButton.md | 16 ++++++------- ...oUnderTheHoodDependencyObjectGeneration.md | 12 +++++----- .../201809-UnoUnderTheHoodXamlGeneration.md | 8 +++---- 20 files changed, 65 insertions(+), 65 deletions(-) diff --git a/doc/ReleaseNotes/LegacyReleaseNotes.md b/doc/ReleaseNotes/LegacyReleaseNotes.md index f180cb442520..1258bc635b12 100644 --- a/doc/ReleaseNotes/LegacyReleaseNotes.md +++ b/doc/ReleaseNotes/LegacyReleaseNotes.md @@ -190,7 +190,7 @@ uid: Uno.ReleaseNotes.Legacy - **Custom Themes** are supported. This let you specify `HighContrast` or any other custom themes. (this is a feature not supported in UWP) - ``` csharp + ```csharp // Put that somewhere during app initialization... Uno.UI.ApplicationHelper.RequestedCustomTheme = "MyCustomTheme"; ``` diff --git a/doc/articles/features/ElevatedView.md b/doc/articles/features/ElevatedView.md index 1b4d71be87c7..7a9abcdef77c 100644 --- a/doc/articles/features/ElevatedView.md +++ b/doc/articles/features/ElevatedView.md @@ -20,7 +20,7 @@ xmlns:toolkit="using:Uno.UI.Toolkit" After that, use the `ElevatedView` to host the content you need to be elevated: -``` xml +```xml diff --git a/doc/articles/features/Lottie.md b/doc/articles/features/Lottie.md index e60bfd909c28..f10dcc40a645 100644 --- a/doc/articles/features/Lottie.md +++ b/doc/articles/features/Lottie.md @@ -131,7 +131,7 @@ Here's how to use this feature: 1. Add a _css-like_ declaration to your Lottie shape like this then put this in the name of the shape. That means the `nm` property in the json-generated file. - ``` css + ```css { Color: var(MyColor); } ``` @@ -139,7 +139,7 @@ Here's how to use this feature: 2. Use it that way: - ``` xml + ```xml diff --git a/doc/articles/features/applicationdata.md b/doc/articles/features/applicationdata.md index c07207544a62..9593e2ec0100 100644 --- a/doc/articles/features/applicationdata.md +++ b/doc/articles/features/applicationdata.md @@ -52,7 +52,7 @@ string text = await FileIO.ReadTextAsync(file); The `LocalSettings` and `RoamingSettings` properties provide access to simple key-value containers that allow storage of lightweight user and application preferences. The values stored in settings should be simple serializable types. To store more complex data structures, it is preferred to serialize them first into a string (for example using a JSON serializer). -``` csharp +```csharp ApplicationDataContainer localSettings = ApplicationData.Current.LocalSettings; // Save a setting. diff --git a/doc/articles/features/custom-fonts.md b/doc/articles/features/custom-fonts.md index 4bcad677db99..c7d47f642342 100644 --- a/doc/articles/features/custom-fonts.md +++ b/doc/articles/features/custom-fonts.md @@ -25,7 +25,7 @@ In order to use a custom font in your application: On Wasm platform, fonts files are loaded by the browser and can take some time to load, resulting in performance degradation and potential flickering when the font is actually available for rendering. In order to prevent this, it is possible to instruct the browser to preload the font before the rendering: -``` csharp +```csharp // Preloading of font families on Wasm. Add this before the Application.Start() in the Program.cs public static void Main(string[] args) @@ -203,7 +203,7 @@ First, the font needs to be defined in CSS. Second, you can use it in XAML in this way: -``` xml +```xml This text should be rendered using the font defined as base64 in CSS. diff --git a/doc/articles/features/routed-events.md b/doc/articles/features/routed-events.md index 5a172ee71e3f..319f469b0e63 100644 --- a/doc/articles/features/routed-events.md +++ b/doc/articles/features/routed-events.md @@ -10,7 +10,7 @@ This article covers some of the finer technical details of Uno Platform's routed ## Event Bubbling Flow -``` plain +```plain [1]---------------------+ | An event is fired | +--------+--------------+ @@ -80,7 +80,7 @@ platform propagate the events. But this will cause more interop between managed You can control which events are bubbling in managed code by using the `EventsBubblingInManagedCode` dependency property. The value of this property is inherited to children. Example: -``` csharp +```csharp // Make sure PointerPressed and PointerReleased are always bubbling in // managed code when they are originating from myControl and its children. myControl.EventsBubblingInManagedCode = diff --git a/doc/articles/features/web-authentication-broker.md b/doc/articles/features/web-authentication-broker.md index dc2b650942e9..3a4f21fa9cca 100644 --- a/doc/articles/features/web-authentication-broker.md +++ b/doc/articles/features/web-authentication-broker.md @@ -26,7 +26,7 @@ uid: Uno.Features.WAB * You **MUST** declare an activity inheriting from `WebAuthenticationBrokerActivityBase` in the Android head. Note the `[Activity]` attribute needs to include `Exported = true` if you are targeting Android 12. - ``` csharp + ```csharp // Android: add this class near the MainActivity, in the head project [Activity(NoHistory = true, LaunchMode = LaunchMode.SingleTop, Exported = true)] [IntentFilter( @@ -52,7 +52,7 @@ uid: Uno.Features.WAB For special needs, it is possible to create a custom implementation of the Web Authentication Broker by using the `[ApiExtension]` mechanism of Uno and implementing the `IWebAuthenticationBrokerProvider` interface: -``` csharp +```csharp [assembly: ApiExtension(typeof(MyNameSpace.MyBrokerImplementation), typeof(Uno.AuthenticationBroker.IWebAuthenticationBrokerProvider))] public class MyBrokerImplementation : Uno.AuthenticationBroker.IWebAuthenticationBrokerProvider @@ -74,7 +74,7 @@ On WebAssembly, it is possible to use an in-application `