alpha

Sets coding rules for WinUI 3 and Windows App SDK desktop apps, forbidding legacy UWP APIs and enforcing correct XAML namespaces, threading, windowing and MVVM.
description: 'WinUI 3 and Windows App SDK coding guidelines. Prevents common UWP API misuse, enforces correct XAML namespaces, threading, windowing, and MVVM patterns for desktop Windows apps.'
applyTo: '**/.xaml, **/.cs, **/*.csproj'
These UWP patterns are wrong for WinUI 3 desktop apps. Always use the Windows App SDK equivalent.
Windows.UI.Popups.MessageDialog. Use ContentDialog with XamlRoot set.ContentDialog without setting dialog.XamlRoot = this.Content.XamlRoot first.CoreDispatcher.RunAsync or Dispatcher.RunAsync. Use DispatcherQueue.TryEnqueue.Window.Current. Track the main window via a static App.MainWindow property.Windows.UI.Xaml.* namespaces. Use Microsoft.UI.Xaml.*.Windows.UI.Composition. Use Microsoft.UI.Composition.Windows.UI.Colors. Use Microsoft.UI.Colors.ApplicationView or CoreWindow for window management. Use Microsoft.UI.Windowing.AppWindow.CoreApplicationViewTitleBar. Use AppWindowTitleBar.GetForCurrentView() patterns (e.g., UIViewSettings.GetForCurrentView()). These do not exist in desktop WinUI 3. Use AppWindow APIs instead.PrintManager directly. Use IPrintManagerInterop with a window handle.DataTransferManager directly for sharing. Use IDataTransferManagerInterop with a window handle.IBackgroundTask. Use Microsoft.Windows.AppLifecycle activation.WebAuthenticationBroker. Use OAuth2Manager (Windows App SDK 1.7+).Microsoft.UI.Xaml, not Windows.UI.Xaml.{x:Bind} over {Binding} for compiled, type-safe, higher-performance bindings.x:DataType on DataTemplate elements when using {x:Bind} — this is required for compiled bindings in templates. On Page/UserControl, x:DataType enables compile-time binding validation but is not strictly required if the DataContext does not change.Mode=OneWay for dynamic values, Mode=OneTime for static, Mode=TwoWay only for editable inputs.DispatcherQueue.TryEnqueue(() => { ... }) to update UI from background threads.TryEnqueue returns bool, not a Task — it is fire-and-forget.DispatcherQueue.HasThreadAccess before dispatching.AppWindow from a WinUI 3 Window via WindowNative.GetWindowHandle → Win32Interop.GetWindowIdFromWindow → AppWindow.GetFromWindowId.AppWindow for resize, move, title, and presenter operations.AppWindow.TitleBar properties, not CoreApplicationViewTitleBar.App.MainWindow (a static property set in OnLaunched).dialog.XamlRoot = this.Content.XamlRoot before calling ShowAsync().WinRT.Interop.InitializeWithWindow.Initialize(picker, hwnd) where hwnd comes from WindowNative.GetWindowHandle(App.MainWindow).IDataTransferManagerInterop, IPrintManagerInterop) with window handles.CommunityToolkit.Mvvm ([ObservableProperty], [RelayCommand]) for MVVM infrastructure.Microsoft.Extensions.DependencyInjection for service registration and injection.async/await for I/O and long-running work to keep the UI responsive.net10.0-windows10.0.22621.0 (or appropriate TFM for the project's target SDK).<UseWinUI>true</UseWinUI> in the project file.Microsoft.WindowsAppSDK NuGet package.System.Text.Json with source generators for JSON serialization.is null / is not null instead of == null.as/is with null checks.var only when the type is obvious.AutomationProperties.Name on all interactive controls.AutomationProperties.HeadingLevel on section headers.AutomationProperties.AccessibilityView="Raw".{x:Bind} (compiled) over {Binding} (reflection-based).{Binding} (reflection-based) does not work at all. Only {x:Bind} (compiled bindings) is supported. If the project uses NativeAOT, use {x:Bind} exclusively.x:Load or x:DeferLoadStrategy for UI elements that are not immediately needed.ItemsRepeater with virtualization for large lists.Grid over nested StackPanel chains.async/await for all I/O; never block the UI thread.ApplicationData.Current.LocalSettings works as expected.Environment.GetFolderPath(SpecialFolder.LocalApplicationData)).ApplicationData is always available — check packaging status first.CaptionTextBlockStyle, BodyTextBlockStyle, BodyStrongTextBlockStyle, SubtitleTextBlockStyle, TitleTextBlockStyle, TitleLargeTextBlockStyle, DisplayTextBlockStyle).FontSize, FontWeight, or FontFamily.{ThemeResource} for brushes and colors to support Light, Dark, and High Contrast themes automatically.#FFFFFF, Colors.White, etc.) for UI elements. Use theme resources like TextFillColorPrimaryBrush, CardBackgroundFillColorDefaultBrush, CardStrokeColorDefaultBrush.SystemAccentColor (and Light1–Light3, Dark1–Dark3 variants) for the user's accent color palette.CardStrokeColorDefaultBrush or ControlStrokeColorDefaultBrush.Grid over deeply nested StackPanel chains for performance.Auto for content-sized rows/columns, * for proportional sizing. Avoid fixed pixel sizes.VisualStateManager with AdaptiveTrigger for responsive layouts at breakpoints (640px, 1008px).ControlCornerRadius (4px) for small controls and OverlayCornerRadius (8px) for cards, dialogs, flyouts.MicaBackdrop) for the app window backdrop. Requires transparent layers above to show through.LayerFillColorDefaultBrush for content layers above Mica.ThemeShadow with Z-axis Translation for elevation. Cards: 4–8 px, Flyouts: 32 px, Dialogs: 128 px.EntranceThemeTransition, RepositionThemeTransition, ContentThemeTransition, AddDeleteThemeTransition).NavigationView for primary app navigation (not custom sidebars).InfoBar for persistent in-app notifications (not custom banners).TeachingTip for contextual guidance (not custom popups).NumberBox for numeric input (not TextBox with manual validation).ToggleSwitch for on/off settings (not CheckBox).ItemsView as the modern collection control for displaying data with built-in selection, virtualization, and layout flexibility.ListView/GridView for standard virtualized lists and grids, especially when built-in selection support is needed.ItemsRepeater only for fully custom virtualizing layouts where you need complete control over rendering and do not need built-in selection or interaction handling.Expander for collapsible sections (not custom visibility toggling).async void event handlers in try/catch to prevent unhandled crashes.InfoBar (with Severity = Error) for user-facing error messages, not ContentDialog for routine errors.App.UnhandledException for logging and graceful recovery.[TestMethod] for pure logic tests. Use [UITestMethod] for any test that creates or interacts with Microsoft.UI.Xaml types (controls, pages, user controls).Resources.resw files, not in code or XAML literals.x:Uid in XAML for localized text binding.logo.scale-200.png); reference without scale qualifier (ms-appx:///Assets/logo.png).© GitHub, Inc. · MIT · source · posted by @OpenSourceBuffGuy on promptparty.com


Builds configuration validation for an application: schemas, per-environment rules, runtime checks, secret handling, tests and a security report.
slash-command, code-generation, python, best-practices, security-review, testing, audit, yaml-prompt, developer-tools, for-developers, for-devops-engineers, code, report, documentation, migration, advanced, long-form, devops, deployment, structured-output

Acid Lime 3D Streetwear Type Poster Style
Defines a JSON style for glossy 3D streetwear campaign posters with black block type, acid-lime marker strokes, stickers and fashion props, with fill-in variables.
image-prompt, json-prompt, template, placeholders, 3d-render, fashion, toys, poster, vibrant-colors, studio-lighting, low-angle, sticker, typography, text-rendering, structured-output, style-reference, negative-prompt, for-designers, for-marketers, long-form, advanced

Helps an agent create, configure and deploy Azure Static Web Apps with the SWA CLI, including local emulation, Functions APIs and CI/CD.
agent-skill, azure, deployment, github-actions, ci-cd, serverless, command-line, frontend, step-by-step-guide, for-developers, best-practices, authentication, web-development, scaffolding, cloud, api, nodejs
Loading reviews…
Loading comments…