Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

winui-samples

WinUI 3 samples browser for Infragistics WinUI components.

Structure

winui-samples/
├── SamplesBrowser.sln       ← Open this solution to build and run
├── samples/                  ← Individual, independently-buildable samples
│   ├── charts/
│   │   └── category-chart/
│   │       ├── overview/     ← Each sample is a standalone WinUI project
│   │       └── animation/
│   ├── gauges/
│   │   └── radial-gauge/
│   │       └── overview/
│   └── ...
├── browser/
│   └── SamplesBrowser/       ← Combined samples browser application
│       ├── Pages/            ← Auto-populated by ingest-samples.ps1
│       ├── Services/         ← TocService reads toc.json
│       ├── Assets/toc.json   ← Auto-generated by ingest-samples.ps1
│       └── SampleRegistry.cs ← Auto-generated by ingest-samples.ps1
└── scripts/
    └── ingest-samples.ps1    ← PowerShell ingest script

Individual Samples

Each folder under samples/ is a standalone, independently-buildable WinUI 3 application.

To run a sample independently:

  1. Open samples/<group>/<component>/<sample>/WinUIApp.csproj in Visual Studio 2022
  2. Press F5 to build and run

Combined Samples Browser

The browser/SamplesBrowser/ project provides a tree-navigation interface that lets you browse all samples in one place. It uses WinUI 3's NavigationView for the sidebar and lazy-loads only the active sample's content.

The browser preloads Infragistics assemblies and warms representative controls through construction, layout and rendering behind its startup loading indicator before enabling navigation. Map/dashboard controls are excluded to avoid background/network work. Debug output reports component warmup and sample creation/loading times; individual sample data and specialized series can still add first-use work.

Running the Browser

  1. Only when adding or changing samples, run the ingest script to refresh the browser. For an existing checkout, skip this step:

    cd scripts
    .\ingest-samples.ps1
  2. Open SamplesBrowser.sln at the repository root in Visual Studio 2022

  3. Press F5 to build and run

Requirements

  • Visual Studio 2022 with .NET 9 support
  • Windows App SDK 1.8 (restored through NuGet)
  • .NET 9
  • Windows 10 version 1809 (build 17763) or later

Viewing sample source

Open a sample and turn on the Source toggle at the right of its title. Turn it off to return to the live sample. File tabs show the individual sample's original Sample.xaml, Sample.xaml.cs, and its data/view-model/helper files. Source is captured from the standalone samples before browser namespace rewriting and data deduplication. The viewer provides Shiki syntax highlighting, line numbers, scrolling, keyboard file navigation, Copy, and light/dark colors matching the application. Returning to the live sample retains its instance.

Open SamplesBrowser.sln at the repository root, build, and run. Source capture runs automatically using the .NET SDK already required by the sample browser. No Node.js, npm, separate installation, or generated source assets in Git are required.

The WebView loads Shiki 4.5.0 from https://esm.sh when Source is opened and applies highlighting in the browser. Only the selected file is highlighted. An internet connection to that CDN is needed for syntax colors; if it is unavailable, the original source, file tabs and Copy remain usable as plain text.

Generated source documents live under browser/SamplesBrowser/Assets/Source/ and are excluded from Git. They contain the original source text and viewer markup, without a bundled copy of Shiki. Both builds and the ingest script capture source before browser namespace rewriting and data deduplication.

For standalone regeneration and generator validation:

dotnet run --project scripts/source-viewer/SourceViewerGenerator.csproj -- samples browser/SamplesBrowser
dotnet run --project scripts/source-viewer/SourceViewerGenerator.csproj -- --self-test

Shiki is MIT licensed; its notice is in scripts/source-viewer/LICENSE-shiki.txt.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages