### Install Uno Platform CLI Templates Source: https://github.com/unoplatform/uno.toolkit.ui/blob/main/doc/getting-started.md Installs the Uno Platform project templates for use with the .NET command-line interface. This is a prerequisite for creating new projects using the CLI. ```bash dotnet new install Uno.Templates ``` -------------------------------- ### Create New Uno App with Toolkit via CLI Source: https://github.com/unoplatform/uno.toolkit.ui/blob/main/doc/getting-started.md Creates a new Uno Platform application named 'ToolkitApp' using the command-line interface, automatically including the Uno Toolkit feature during project generation. ```bash dotnet new unoapp -o ToolkitApp -toolkit ``` -------------------------------- ### Initialize ToolkitResources in Single Project App.xaml Source: https://github.com/unoplatform/uno.toolkit.ui/blob/main/doc/getting-started.md Adds the ToolkitResources resource dictionary to the Application.Resources in App.xaml for a Single Project template, making Uno Toolkit styles and templates available application-wide. ```xml ``` -------------------------------- ### Add ToolkitResources to Multi-Head AppResources.xaml Source: https://github.com/unoplatform/uno.toolkit.ui/blob/main/doc/getting-started.md Includes the ToolkitResources dictionary within the MergedDictionaries of AppResources.xaml for a Multi-Head project template, providing access to Uno Toolkit resources. ```xml ``` -------------------------------- ### Installing Uno Platform CLI Templates (Bash) Source: https://github.com/unoplatform/uno.toolkit.ui/blob/main/doc/cupertino-getting-started.md Installs the necessary `dotnet new` templates for creating Uno Platform projects, including those with toolkit options. This is a prerequisite for creating new projects using the CLI. ```Bash dotnet new install Uno.Templates ``` -------------------------------- ### Install Uno Platform CLI Templates - Bash Source: https://github.com/unoplatform/uno.toolkit.ui/blob/main/doc/material-getting-started.md Installs the latest Uno Platform project templates for use with the .NET command-line interface. ```bash dotnet new install Uno.Templates ``` -------------------------------- ### Configuring Uno Toolkit with C# Markup Source: https://github.com/unoplatform/uno.toolkit.ui/blob/main/doc/getting-started.md This snippet shows how to initialize the Uno Toolkit library in an application using C# Markup. It requires adding the `Uno.Toolkit.WinUI.Markup` NuGet package and calling the `UseToolkit` extension method on the application builder. ```csharp using Uno.Toolkit.UI.Markup; this.Build(r => r.UseToolkit()); ``` -------------------------------- ### Add ToolkitResources and WinUI Resources to Shared Project App.xaml Source: https://github.com/unoplatform/uno.toolkit.ui/blob/main/doc/getting-started.md Adds both the standard WinUI XamlControlsResources and the Uno ToolkitResources to the Application.Resources in App.xaml for a Shared Project template, ensuring both sets of resources are available. ```xml ``` -------------------------------- ### Add Uno Toolkit Feature to Single Project .csproj Source: https://github.com/unoplatform/uno.toolkit.ui/blob/main/doc/getting-started.md Modifies the project file (.csproj) for a Single Project template to include 'Toolkit' in the list of UnoFeatures, enabling the Uno Toolkit integration. ```xml Toolkit ``` -------------------------------- ### Creating New Uno App with Cupertino Toolkit (Bash) Source: https://github.com/unoplatform/uno.toolkit.ui/blob/main/doc/cupertino-getting-started.md Creates a new Uno Platform application project named `CupertinoToolkitApp`. The `-toolkit` flag includes the Uno Toolkit, and `-theme cupertino` configures it to use the Cupertino theme by default. ```Bash dotnet new unoapp -o CupertinoToolkitApp -toolkit -theme cupertino ``` -------------------------------- ### Example Asset File Paths Source: https://github.com/unoplatform/uno.toolkit.ui/blob/main/samples/Uno.Toolkit.Samples/Uno.Toolkit.Samples/Assets/SharedAssets.md This snippet shows example file path structures for organizing image assets within the 'Assets' directory of a shared project. It demonstrates two common patterns for naming or organizing files to support different display scales (100, 200, 400). These structures help the platform automatically select the appropriate asset based on the device's DPI. ```text \Assets\Images\logo.scale-100.png \Assets\Images\logo.scale-200.png \Assets\Images\logo.scale-400.png \Assets\Images\scale-100\logo.png \Assets\Images\scale-200\logo.png \Assets\Images\scale-400\logo.png ``` -------------------------------- ### Adding Uno Toolkit Features to Single Project (XML) Source: https://github.com/unoplatform/uno.toolkit.ui/blob/main/doc/cupertino-getting-started.md Modifies the `.csproj` file in a Single Project template to explicitly include the `Toolkit` and `Cupertino` features. This enables the use of Uno Toolkit and Cupertino styles and controls. ```XML Toolkit;Cupertino ``` -------------------------------- ### Retrieving Current OS Theme using SystemThemeHelper (C#) Source: https://github.com/unoplatform/uno.toolkit.ui/blob/main/doc/helpers/SystemThemeHelper.md Demonstrates how to use the GetCurrentOsTheme method of SystemThemeHelper to get the current operating system theme and print it to the console. ```csharp var osTheme = SystemThemeHelper.GetCurrentOsTheme(); Console.WriteLine($"Current OS Theme: {osTheme}"); ``` -------------------------------- ### Initializing Cupertino Toolkit Resources in App.xaml (XAML) Source: https://github.com/unoplatform/uno.toolkit.ui/blob/main/doc/cupertino-getting-started.md Adds `ResourceDictionary` entries to the application's resources in `App.xaml`. This merges the necessary Cupertino core resources (`CupertinoColors`, `CupertinoFonts`, `CupertinoResources`) and the Cupertino Toolkit resources (`ToolkitResources`, `CupertinoToolkitResources`) for use throughout the application. ```XML ``` -------------------------------- ### Using LoadingView with Single and Multiple Sources (XAML) Source: https://github.com/unoplatform/uno.toolkit.ui/blob/main/doc/controls/LoadingView.md This XAML snippet demonstrates two common usage patterns for the `LoadingView` control. The first example shows binding to a single `Source` (like an `AsyncCommand`) and defining custom `LoadingContent`. The second example illustrates using `CompositeLoadableSource` to track the loading state of multiple sources simultaneously, displaying a simple `ProgressRing` as loading content. ```xml xmlns:utu="using:Uno.Toolkit.UI" ...