A minimal, fully working WinUI 3 .NET 10 example demonstrating the PesgoWinUI (Scientific Graph Object) from Gigasoft ProEssentials. Clone, build, run — no configuration required.
This is a self-contained WinUI 3 implementation of Example 100 — Simple Scientific Graph, the foundational Pesgo example in the ProEssentials library. The full example suite, including C#, C++ MFC, and VBA versions, is available at:
Example 100 is the base that many subsequent ProEssentials examples build upon — other examples in the suite introduce their feature and show only the difference from this starting point.
The chart-configuration code is identical to the WinForms and WPF versions of this example. The ProEssentials API does not change between interfaces; only the window plumbing differs.
- 4 subsets (Horsepower, Torque, Temperature, Pressure) × 120 points each
- Continuous XY data — X axis values at 100, 200, 300... intervals
- Spline plus point plotting with gradient and bevel effects
- Dark theme via
QuickStyle.DarkNoBorder - Direct2D GPU rendering with anti-aliasing
- Hover tooltip showing XY values
- Left-click drag to zoom, right-click for full context menu
- Built-in export, print, and customization dialog
- Visual Studio 2026 with the .NET desktop development and Windows application development workloads
- .NET 10 SDK
- Internet connection for NuGet restore
1. Clone this repository
2. Open ProEssentialsWinUIQuickstart.sln in Visual Studio 2026
3. Build → Rebuild Solution (restores NuGet packages automatically)
4. Press F5
Right-click anywhere on the chart to explore the built-in context menu — export, print, zoom reset, and full property customization are all built in.
PesgoWinUI vs PegoWinUI — Pesgo is the Scientific Graph Object. Unlike Pego which assumes equally-spaced X values, Pesgo requires explicit PeData.X[s,p] values alongside PeData.Y[s,p]. Use Pesgo for scientific, engineering, and any data where X spacing is irregular or meaningful. The WinUI control types carry a WinUI suffix so they can share one namespace with the WinForms and WPF types.
Control Loaded event — ProEssentials initialization must happen in the control's own Loaded event (Pesgo1_Loaded), never at window level. This matters more in WinUI than elsewhere: a WinUI Window is not a Control and has no Loaded event at all.
Window sizing is code, not XAML — WinUI's Window has no Height/Width/MinWidth properties in XAML. SizeAndCenterWindow() sets the size with a Win32 MoveWindow call.
ReinitializeResetImage() — always the last call after setting properties. Triggers the full data-to-image render pipeline.
No XAML designer — Visual Studio has no XAML designer for WinUI 3, so the chart is declared in markup (<pe:PesgoWinUI x:Name="Pesgo1" />) rather than dragged from the Toolbox. This is a Windows App SDK limitation, not a ProEssentials one.
This project references ProEssentials.Chart.Net10.WinUI from nuget.org. Package restore happens automatically on build.
The AnyCpu package embeds the native rendering engines inside the assembly and unpacks the one matching the running process at run time, so there is no native DLL to copy or deploy alongside your app.
WinUI deploys differently than WPF and WinForms — worth knowing before you ship:
- A .NET app is not a single exe. Ship the entire build/publish output folder, never a hand-picked subset.
- The target machine needs two runtimes: the .NET 10 Desktop Runtime and the Windows App SDK Runtime. Alternatively publish self-contained with
-p:WindowsAppSDKSelfContained=true. - Your development machine already has both, so it will run from an under-filled folder. Always validate on a clean machine.
The nuget.org package is the evaluation build and draws an "Evaluating ProEssentials" watermark across the chart. A licensed installation replaces the assembly and the watermark goes away — everything else behaves identically.
The full ProEssentials example suite with 116 examples across C#, C++ MFC, and VBA is included with the evaluation download:
⬇️ No-hassle evaluation download 📖 Developer Guide 🔍 API Explorer 🌐 gigasoft.com
Example code is MIT licensed. ProEssentials requires a commercial license for continued use.
