Token导航 LogoToken导航

Agent Skill · 研究检索

dotnet-winui(点网 winui)

dotnet-winui 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

dotnet-winui 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 50,332。

总安装 618周安装 25GitHub Stars 15下载 194核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:dotnet-winui(点网 winui)
来源仓库:https://github.com/wshaddix/dotnet-skills
仓库路径:skills/dotnet-winui
安装命令:
npx skills add https://github.com/wshaddix/dotnet-skills --skill dotnet-winui
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/wshaddix/dotnet-skills --skill dotnet-winui

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

覆盖 WinUI 3 与 Windows App SDK 开发。提供 XAML 编译绑定、MVVM 集成与 MSIX 部署。支持 UWP 迁移与 Windows 系统集成。适用于 Windows 原生应用现代化重构。

适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。dotnet-winui 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/dotnet-winui

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/wshaddix/dotnet-skills --skill dotnet-winui;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

dotnet-winui 怎么安装?

在终端执行 npx skills add https://github.com/wshaddix/dotnet-skills --skill dotnet-winui。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

dotnet-winui 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

dotnet-winui 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

dotnet-winui 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

dotnet-winui 用的人多吗?

公开数据是累计安装 618 次,近一周安装 25 次,下载 194 次,GitHub 15 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

dotnet-winui 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
dotnet-winui

点网 winui · 本页

61815需要联网未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

dotnet-winui

WinUI 3 / Windows App SDK development: project setup with UseWinUI and Windows 10 TFM, XAML patterns with compiled bindings (x:Bind) and deferred loading (x:Load), MVVM with CommunityToolkit.Mvvm, MSIX and unpackaged deployment modes, Windows integration (lifecycle, notifications, widgets), UWP migration guidance, and common agent pitfalls.

Version assumptions:.NET 8.0+ baseline. Windows App SDK 1.6+ (current stable). TFM net8.0-windows10.0.19041.0..NET 9 features explicitly marked.

Scope boundary: This skill owns WinUI 3 project setup, XAML patterns, MVVM integration, packaging modes, Windows platform integration, and UWP migration guidance. Desktop testing is owned by [skill:dotnet-ui-testing-core]. Migration decision matrix is owned by [skill:dotnet-wpf-migration].

Out of scope: Desktop UI testing (Appium, WinAppDriver) -- see [skill:dotnet-ui-testing-core]. General Native AOT patterns -- see [skill:dotnet-native-aot]. UI framework selection decision tree -- see [skill:dotnet-ui-chooser]. WPF patterns -- see [skill:dotnet-wpf-modern].

Cross-references: [skill:dotnet-ui-testing-core] for desktop testing, [skill:dotnet-wpf-modern] for WPF patterns, [skill:dotnet-wpf-migration] for migration guidance, [skill:dotnet-native-aot] for general AOT, [skill:dotnet-ui-chooser] for framework selection, [skill:dotnet-native-interop] for general P/Invoke patterns (CsWin32 generates P/Invoke declarations), [skill:dotnet-accessibility] for accessibility patterns (AutomationProperties, AutomationPeer, UI Automation).


Project Setup

WinUI 3 uses the Windows App SDK (formerly Project Reunion) as its runtime and API layer. Projects target a Windows 10 version-specific TFM.

<!-- MyWinUIApp.csproj -->
<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>WinExe</OutputType>
    <TargetFramework>net8.0-windows10.0.19041.0</TargetFramework>
    <UseWinUI>true</UseWinUI>
    <Nullable>enable</Nullable>
    <ImplicitUsings>enable</ImplicitUsings>

    <!-- Windows App SDK version (auto-referenced via UseWinUI) -->
    <WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="CommunityToolkit.Mvvm" Version="8.*" />
    <PackageReference Include="CommunityToolkit.WinUI.Controls.SettingsControls" Version="8.*" />
    <PackageReference Include="Microsoft.Extensions.Hosting" Version="8.*" />
  </ItemGroup>
</Project>

Project Layout

MyWinUIApp/
  App.xaml / App.xaml.cs        # Application entry, resource dictionaries
  MainWindow.xaml / .xaml.cs    # Main window
  ViewModels/                   # MVVM ViewModels
  Views/                        # XAML pages (for Frame navigation)
  Models/                       # Data models
  Services/                     # Service interfaces and implementations
  Assets/                       # Images, icons
  Package.appxmanifest          # MSIX manifest (packaged mode)
  Properties/
    launchSettings.json

Host Builder Pattern

Modern WinUI apps use the generic host for dependency injection and service configuration:

// App.xaml.cs
public partial class App : Application
{
    private readonly IHost _host;

    public App()
    {
        this.InitializeComponent();

        _host = Host.CreateDefaultBuilder()
            .ConfigureServices((context, services) =>
            {
                // Services
                services.AddSingleton<INavigationService, NavigationService>();
                services.AddSingleton<IProductService, ProductService>();

                // ViewModels
                services.AddTransient<MainViewModel>();
                services.AddTransient<ProductDetailViewModel>();

                // Views
                services.AddTransient<MainPage>();
                services.AddTransient<ProductDetailPage>();

                // Windows
                services.AddSingleton<MainWindow>();
            })
            .Build();
    }

    protected override async void OnLaunched(LaunchActivatedEventArgs args)
    {
        await _host.StartAsync();

        var mainWindow = _host.Services.GetRequiredService<MainWindow>();
        mainWindow.Closed += async (_, _) =>
        {
            await _host.StopAsync();
            _host.Dispose();
        };
        mainWindow.Activate();
    }

    public static T GetService<T>() where T : class
    {
        var app = (App)Application.Current;
        return app._host.Services.GetRequiredService<T>();
    }
}

TFM Requirements

The net8.0-windows10.0.19041.0 TFM specifies:

  • .NET 8.0 -- the runtime version
  • Windows 10 build 19041 (version 2004) -- the minimum Windows SDK version

Windows App SDK features may require higher SDK versions:

  • Widgets (Windows 11): net8.0-windows10.0.22000.0 (Windows 11 build 22000)
  • Mica backdrop: net8.0-windows10.0.22000.0
  • Snap layouts integration: net8.0-windows10.0.22000.0

XAML Patterns

WinUI 3 XAML is distinct from UWP XAML. The root namespace is Microsoft.UI.Xaml, not Windows.UI.Xaml.

Compiled Bindings (x:Bind)

x:Bind provides compile-time type checking and better performance than {Binding}. It resolves properties relative to the code-behind class (not the DataContext).

<Page x:Class="MyApp.Views.ProductListPage"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:vm="using:MyApp.ViewModels">

    <Page.Resources>
        <!-- x:Bind resolves against code-behind, so expose ViewModel as property -->
    </Page.Resources>

    <StackPanel Padding="16" Spacing="12">
        <TextBox Text="{x:Bind ViewModel.SearchTerm, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
        <Button Content="Search" Command="{x:Bind ViewModel.SearchCommand}" />

        <ListView ItemsSource="{x:Bind ViewModel.Products, Mode=OneWay}"
                  SelectionMode="Single">
            <ListView.ItemTemplate>
                <DataTemplate x:DataType="vm:ProductViewModel">
                    <StackPanel Orientation="Horizontal" Spacing="12" Padding="8">
                        <Image Source="{x:Bind ImageUrl}" Height="60" Width="60" />
                        <StackPanel>
                            <TextBlock Text="{x:Bind Name}" Style="{StaticResource BodyStrongTextBlockStyle}" />
                            <TextBlock Text="{x:Bind Price}" Style="{StaticResource CaptionTextBlockStyle}" />
                        </StackPanel>
                    </StackPanel>
                </DataTemplate>
            </ListView.ItemTemplate>
        </ListView>
    </StackPanel>
</Page>
// Code-behind: expose ViewModel property for x:Bind
public sealed partial class ProductListPage : Page
{
    public ProductListViewModel ViewModel { get; }

    public ProductListPage()
    {
        ViewModel = App.GetService<ProductListViewModel>();
        this.InitializeComponent();
    }
}

Key differences from {Binding}:

  • x:Bind is resolved at compile time (type-safe, faster)
  • Default mode is OneTime (not OneWay like {Binding})
  • Resolves against the code-behind class, not DataContext
  • Requires x:DataType in DataTemplate items

Deferred Loading (x:Load)

Use x:Load to defer element creation until needed, reducing initial page load time:

<StackPanel>
    <TextBlock Text="Always visible" />

    <!-- This panel is not created until ShowDetails is true -->
    <StackPanel x:Load="{x:Bind ViewModel.ShowDetails, Mode=OneWay}" x:Name="DetailsPanel">
        <TextBlock Text="Detail content loaded on demand" />
        <ListView ItemsSource="{x:Bind ViewModel.DetailItems, Mode=OneWay}" />
    </StackPanel>
</StackPanel>

When to use x:Load: Heavy UI sections (complex lists, settings panels, detail views) that are not immediately visible. The element is created when the bound property becomes true and destroyed when it becomes false.

NavigationView Pattern

WinUI apps typically use NavigationView with a Frame for page navigation:

<!-- MainWindow.xaml -->
<Window x:Class="MyApp.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <NavigationView x:Name="NavView"
                    IsBackButtonVisible="Collapsed"
                    SelectionChanged="NavView_SelectionChanged">
        <NavigationView.MenuItems>
            <NavigationViewItem Content="Home" Tag="home" Icon="Home" />
            <NavigationViewItem Content="Products" Tag="products" Icon="Shop" />
            <NavigationViewItem Content="Settings" Tag="settings" Icon="Setting" />
        </NavigationView.MenuItems>

        <Frame x:Name="ContentFrame" />
    </NavigationView>
</Window>

MVVM

WinUI 3 integrates with CommunityToolkit.Mvvm (the same MVVM Toolkit used by MAUI). Source generators eliminate boilerplate for properties and commands.

// ViewModels/ProductListViewModel.cs
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;

public partial class ProductListViewModel : ObservableObject
{
    private readonly IProductService _productService;

    public ProductListViewModel(IProductService productService)
    {
        _productService = productService;
    }

    [ObservableProperty]
    [NotifyCanExecuteChangedFor(nameof(SearchCommand))]
    private string _searchTerm = "";

    [ObservableProperty]
    private ObservableCollection<ProductViewModel> _products = [];

    [ObservableProperty]
    private bool _isLoading;

    [ObservableProperty]
    private bool _showDetails;

    [RelayCommand]
    private async Task LoadProductsAsync(CancellationToken ct)
    {
        IsLoading = true;
        try
        {
            var items = await _productService.GetProductsAsync(ct);
            Products = new ObservableCollection<ProductViewModel>(
                items.Select(p => new ProductViewModel(p)));
        }
        finally
        {
            IsLoading = false;
        }
    }

    [RelayCommand(CanExecute = nameof(CanSearch))]
    private async Task SearchAsync(CancellationToken ct)
    {
        var results = await _productService.SearchAsync(SearchTerm, ct);
        Products = new ObservableCollection<ProductViewModel>(
            results.Select(p => new ProductViewModel(p)));
    }

    private bool CanSearch() => !string.IsNullOrWhiteSpace(SearchTerm);
}

Key source generator attributes:

  • [ObservableProperty] -- generates property with INotifyPropertyChanged from a backing field
  • [RelayCommand] -- generates ICommand from a method (supports async, cancellation, CanExecute)
  • [NotifyPropertyChangedFor] -- raises PropertyChanged for dependent properties
  • [NotifyCanExecuteChangedFor] -- re-evaluates command CanExecute when property changes

Packaging

WinUI 3 supports two deployment models: MSIX packaged and unpackaged. The choice affects app identity, capabilities, and distribution.

MSIX Packaged Deployment

MSIX is the default packaging model. It provides app identity, clean install/uninstall, automatic updates, and access to full Windows integration APIs.

<!-- Package.appxmanifest declares app identity and capabilities -->
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
         xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
         xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10">

  <Identity Name="MyApp" Publisher="CN=Contoso" Version="1.0.0.0" />

  <Applications>
    <Application Id="App"
                 Executable="$targetnametoken$.exe"
                 EntryPoint="$targetentrypoint$">
      <uap:VisualElements DisplayName="My App"
                          Description="WinUI 3 application"
                          BackgroundColor="transparent"
                          Square150x150Logo="Assets\Square150x150Logo.png"
                          Square44x44Logo="Assets\Square44x44Logo.png" />
    </Application>
  </Applications>

  <Capabilities>
    <Capability Name="internetClient" />
  </Capabilities>
</Package>
# Build MSIX package
dotnet publish -c Release -r win-x64

Unpackaged Deployment

Unpackaged mode removes MSIX requirements. The app runs as a standard Win32 executable without app identity.

<!-- .csproj: enable unpackaged mode -->
<PropertyGroup>
  <WindowsPackageType>None</WindowsPackageType>
</PropertyGroup>

Trade-offs:

FeatureMSIX PackagedUnpackaged
App identityYesNo
Clean install/uninstallYes (Add/Remove Programs)Manual
Auto-updateYes (Store, App Installer)Manual
Background tasksFull supportLimited
Toast notificationsFull supportRequires COM registration
Widgets (Windows 11)YesNo
File type associationsVia manifestVia registry
DistributionStore, sideload, App Installerxcopy, installer (MSI/EXE)
Startup timeSlightly slower (package verification)Faster

When to choose unpackaged:

  • Internal enterprise tools with existing deployment infrastructure
  • Apps that need xcopy deployment or integration with existing MSI/EXE installers
  • Quick prototypes where packaging overhead is unnecessary
  • Apps that do not need Windows identity features

Windows Integration

App Lifecycle

WinUI 3 apps use the Windows App SDK activation and lifecycle model, distinct from UWP's CoreApplication.

// Handle activation kinds (protocol, file, toast, etc.)
public partial class App : Application
{
    protected override void OnLaunched(LaunchActivatedEventArgs args)
    {
        // Check for specific activation
        var activationArgs = AppInstance.GetCurrent().GetActivatedEventArgs();

        switch (activationArgs.Kind)
        {
            case ExtendedActivationKind.Protocol:
                var protocolArgs = (ProtocolActivatedEventArgs)activationArgs.Data;
                HandleProtocolActivation(protocolArgs.Uri);
                break;

            case ExtendedActivationKind.File:
                var fileArgs = (FileActivatedEventArgs)activationArgs.Data;
                HandleFileActivation(fileArgs.Files);
                break;

            default:
                // Normal launch
                break;
        }
    }
}

Notifications

Toast notifications require the Windows App SDK notification APIs:

using Microsoft.Windows.AppNotifications;
using Microsoft.Windows.AppNotifications.Builder;

// Register for notification activation
var notificationManager = AppNotificationManager.Default;
notificationManager.NotificationInvoked += OnNotificationInvoked;
notificationManager.Register();

// Send a toast notification
var builder = new AppNotificationBuilder()
    .AddText("Order Shipped")
    .AddText("Your order #12345 has shipped.")
    .AddButton(new AppNotificationButton("Track")
        .AddArgument("action", "track")
        .AddArgument("orderId", "12345"));

AppNotificationManager.Default.Show(builder.BuildNotification());

Widgets (Windows 11)

Widgets require Windows 11 (build 22000+) and MSIX packaged deployment. The implementation involves creating a widget provider that implements IWidgetProvider and registering it in the MSIX manifest.

Key steps:

  1. Implement IWidgetProvider interface (methods: CreateWidget, DeleteWidget, OnActionInvoked, OnWidgetContextChanged, OnCustomizationRequested, Activate, Deactivate)
  2. Register the provider as a COM class in the MSIX manifest
  3. Define widget templates using Adaptive Cards JSON format
  4. Return updated widget content from provider methods

See the Windows App SDK Widget documentation for the complete interface contract and manifest registration.

Taskbar Integration

Taskbar progress in WinUI 3 requires Win32 COM interop via the ITaskbarList3 interface. Unlike UWP which had a managed TaskbarManager, WinUI 3 does not expose a managed wrapper.

// Taskbar progress requires COM interop in WinUI 3
// Use CsWin32 source generator or manual P/Invoke for ITaskbarList3
// 1. Add CsWin32: <PackageReference Include="Microsoft.Windows.CsWin32" Version="0.3.*" />
// 2. Add to NativeMethods.txt: ITaskbarList3
// See: https://learn.microsoft.com/en-us/windows/win32/api/shobjidl_core/nn-shobjidl_core-itaskbarlist3

UWP Migration

Migrating from UWP to WinUI 3 involves namespace changes, API replacements, and project restructuring.

Namespace Changes

UWP NamespaceWinUI 3 Namespace
Windows.UI.XamlMicrosoft.UI.Xaml
Windows.UI.Xaml.ControlsMicrosoft.UI.Xaml.Controls
Windows.UI.Xaml.MediaMicrosoft.UI.Xaml.Media
Windows.UI.Xaml.InputMicrosoft.UI.Xaml.Input
Windows.UI.CompositionMicrosoft.UI.Composition
Windows.UI.TextMicrosoft.UI.Text
Windows.UI.ColorsMicrosoft.UI.Colors

Keep as-is: Windows.Storage, Windows.Networking, Windows.Security, Windows.ApplicationModel, Windows.Devices -- these WinRT APIs remain in the Windows.* namespace.

API Replacements

UWP APIWinUI 3 Replacement
CoreApplication.MainViewApp.MainWindow (track your own window reference)
CoreDispatcher.RunAsyncDispatcherQueue.TryEnqueue
Window.CurrentTrack window reference manually in App class
ApplicationView.Titlewindow.Title = "..."
CoreWindow.GetForCurrentThreadNot available; use InputKeyboardSource for keyboard APIs
SystemNavigationManager.BackRequestedNavigationView.BackRequested

Migration Steps

  1. Create a new WinUI 3 project using the Windows App SDK template
  2. Copy source files and update namespaces (Windows.UI.Xaml to Microsoft.UI.Xaml)
  3. Update XAML namespaces in all .xaml files
  4. Replace deprecated APIs (see table above)
  5. Migrate packaging from .appxmanifest UWP format to Windows App SDK format
  6. Update NuGet packages to Windows App SDK-compatible versions
  7. Test Windows integration features (notifications, background tasks, file associations)

For comprehensive migration path guidance across frameworks, see [skill:dotnet-wpf-migration].

UWP.NET 9 preview path: Microsoft announced UWP support on.NET 9 as a preview. This allows UWP apps to use modern.NET without migrating to WinUI 3. Evaluate this path if full WinUI migration is too costly but you need modern.NET runtime features.


Agent Gotchas

  1. Do not confuse UWP XAML with WinUI 3 XAML. The root namespace changed from Windows.UI.Xaml to Microsoft.UI.Xaml. Code using Windows.UI.Xaml.* types will not compile in WinUI 3 projects.
  2. Do not use Window.Current. WinUI 3 does not have a static Window.Current property. Track your window reference manually in the App class and pass it via DI or a static property.
  3. Do not use CoreDispatcher. Replace CoreDispatcher.RunAsync() with DispatcherQueue.TryEnqueue(). CoreDispatcher is a UWP API not available in WinUI 3.
  4. Do not assume MSIX is required. WinUI 3 supports unpackaged deployment via <WindowsPackageType>None</WindowsPackageType>. Only use MSIX when you need app identity, Store distribution, or Windows integration features that require it.
  5. Do not forget x:Bind defaults to OneTime. Unlike {Binding} which defaults to OneWay, x:Bind defaults to OneTime. Always specify Mode=OneWay or Mode=TwoWay for properties that change after initial binding.
  6. Do not target Windows 10 builds below 19041. Windows App SDK 1.6+ requires a minimum of build 19041 (version 2004). Targeting lower builds causes runtime failures.
  7. Do not use Widgets or Mica in unpackaged apps. These features require MSIX packaged deployment with app identity. Attempting to use them in unpackaged mode fails silently or throws.
  8. Do not mix CommunityToolkit.Mvvm with manual INotifyPropertyChanged. Use [ObservableProperty] consistently. Mixing source-generated and hand-written implementations causes subtle binding bugs.
  9. Do not forget the Host builder lifecycle. Call _host.StartAsync() in OnLaunched and _host.StopAsync() when the window closes. Forgetting lifecycle management causes DI-registered IHostedService instances to never start or stop.

Prerequisites

  • .NET 8.0+ with Windows desktop workload
  • Windows App SDK 1.6+ (auto-referenced via UseWinUI)
  • Windows 10 version 2004 (build 19041) or later
  • Visual Studio 2022+ with Windows App SDK workload, or VS Code with C# Dev Kit
  • For widgets: Windows 11 (build 22000+)

References

平台分布

Codex

37.22%
按下载量换算72

Claude

33.27%
按下载量换算65

Cursor

17.35%
按下载量换算34

Gemini CLI

9.66%
按下载量换算19

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills