/uno-platform:uno-xamlfrom uno-platform
Provides XAML correctness and performance guidance for Uno Platform: deferred loading, virtualized templates, text trimming, lifecycle cleanup, UI-thread safety, input scopes, keyboard accelerators, focus, and drag/drop.
Ships in uno-platform. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Use this skill for XAML-only correctness and performance details that are not owned by the selected update model, design system, navigation, or layout skill.
uno-mvvm.Frame.Navigate() patterns. Use INavigator, route maps, Region.*, and Navigation.* guidance from the selected navigation/update-model skill.x:Bind only where the source is strongly typed and stable, such as a Page-level ViewModel property or a DataTemplate with a valid x:DataType.{Binding} where Uno template scope requires it, such as nested template item sources, ancestor bindings, or command bindings that need a control DataContext.{Binding StringFormat=...}. Use multiple Run elements or expose a computed property from the selected update model.Use x:Load for expensive optional XAML that is not needed at startup, such as advanced settings panels, secondary tab content, help overlays, or infrequently opened details regions.
<Grid x:Name="AdvancedPanel"
x:Load="{x:Bind ViewModel.ShowAdvancedPanel, Mode=OneWay}">
<!-- Expensive optional content -->
</Grid>
Rules:
Visibility for cheap, frequently toggled state such as validation messages, simple placeholders, and selected visual states.x:Load when delaying construction is the goal; unloaded content releases the element tree and its state.x:Load requires a named element and cannot be used on the root element or inside a ResourceDictionary.ElementName bindings to unloaded elements. If another element binds to a deferred element, load order can break the binding.x:DeferLoadStrategy; use x:Load.x:Load behavior on all target Uno platforms when the loaded subtree contains platform-specific controls, focus targets, popups, WebView, media, or third-party controls.For large linear lists, use virtualized controls such as ListView or GridView. For custom dashboard grids, wrapping cards, or mixed-width tiles, use the existing responsive ItemsRepeater skill instead of generic WinUI list patterns.
Rules:
ListView or GridView in a ScrollViewer; it disables or harms virtualization.x:Name on elements inside virtualized DataTemplates unless there is no alternative. Named template elements are per-container and easy to misuse.x:Phase only for complex ListView/GridView item templates after confirming support on the target Uno platforms. Do not apply it to ItemsRepeater dashboard layouts by default.DataTemplateSelector for heterogeneous item types, but keep selector logic type-based and cheap. Do not perform service calls, visual tree inspection, or layout measurements in selector logic.Keep text containers flexible so localization, text scaling, and runtime data do not clip or overlap.
Rules:
MinHeight and MinWidth over fixed Height and Width for controls that contain text.TextBlock, TextBox, and item rows grow when text scale or localization requires it.MinWidth.Grid constraints when TextTrimming must work. StackPanel and Auto columns often measure children with unconstrained width, so ellipsis may never appear.Auto columns for fixed-size icons, badges, or actions.VerticalScrollBarVisibility="Auto" when a ScrollViewer is required.HorizontalContentAlignment="Stretch" on list-like item containers when content collapses or fails to fill the available width.Grid, StackPanel, or Border elements that do not add layout, styling, semantics, or hit testing.Border for a single-child background, border, or corner-radius container; use Grid when you need rows, columns, layering, or multiple children.<Grid ColumnSpacing="8">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding Name}"
TextTrimming="CharacterEllipsis"/>
<Button Grid.Column="1"
Command="{Binding OpenCommand}"
MinWidth="44"/>
</Grid>
XAML views and controls are UI-thread-bound. Keep async work non-blocking and keep dispatcher usage at the view/control boundary.
Rules:
.Result, .Wait(), Thread.Sleep, or synchronous I/O.await all the way through UI-triggered work.Task.WhenAll for independent asynchronous operations; sequence only when one result depends on another.DispatcherQueue.TryEnqueue only when a background callback must update a UI element directly.DispatcherQueue, Page, Button, TextBox, or visual tree access in ViewModels. Route state through commands, services, or observable properties instead.ConfigureAwait(false) is acceptable. Do not use it in UI code before touching XAML controls.async void except for required UI event handlers. In those handlers, catch/report failures and delegate real work to commands or services.Use code-behind only for UI-only lifecycle mechanics, platform interop, or control events that cannot be represented cleanly as commands.
Rules:
Unloaded when the publisher can outlive the view.DispatcherQueueTimer instances in Unloaded.IDisposable resources such as streams, subscriptions, and temporary media objects.this for long-lived events. Prefer named handlers that can be removed, or weak subscriptions when the publisher is application-scoped.public sealed partial class DetailsPage : Page
{
CancellationTokenSource? loadCts;
public DetailsPage()
{
InitializeComponent();
Unloaded += OnUnloaded;
}
void OnUnloaded(object sender, RoutedEventArgs e)
{
Unloaded -= OnUnloaded;
loadCts?.Cancel();
loadCts?.Dispose();
loadCts = null;
}
}
Add input details that improve correctness without changing the selected design system.
Rules:
InputScope on text inputs where the expected value is known.<TextBox Text="{x:Bind ViewModel.Email, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
InputScope="EmailSmtpAddress" />
<TextBox Text="{x:Bind ViewModel.Phone, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
InputScope="TelephoneNumber" />
<TextBox Text="{x:Bind ViewModel.Quantity, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
InputScope="Number" />
KeyboardAccelerator for common page or menu actions on desktop-class experiences. Route the invoked handler to a command or service; keep the handler thin.AutomationProperties.Name on icon-only controls and custom interactive elements whose visible content is not enough for assistive technology.Button, HyperlinkButton, ToggleSwitch, and MenuFlyoutItem instead of making Border, Grid, or TextBlock clickable.AutomationProperties.AutomationId for elements that UI tests must find reliably. On Uno, native/browser automation mapping requires IsUiAutomationMappingEnabled or Uno.UI.FrameworkElementHelper.IsUiAutomationMappingEnabled; otherwise the property may not be projected to the platform accessibility layer.Background="Transparent" rather than leaving the background unset.Visibility="Collapsed" instead of Opacity="0" when hidden content should not participate in hit testing, accessibility, or layout.Opacity only for visual fades where the element should remain present during the animation.x:Load rather than Visibility when expensive optional UI should not be created until needed.Frame.Navigate() in an Uno Extensions Navigation app.x:Load only where construction cost justifies it.ScrollViewer.Grid or equivalent width constraint.x:Name, deep trees, and expensive selector logic.InputScope.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
9 skills in this plugin
/uno-agentic-supportIn-app support for agentic development of Uno Platform apps. Use when running or preparing a Uno Platform app for agent-driven execution with uno_app_start. Also use when the expected log file specified in AGENT_CONSOLE_LOG is missing or lacks "uno-agentic-support" entry, or Hot Reload / Hot Design remains visible during agent UI testing./uno-csharpmarkup2Build or edit Uno Platform 6 UI in declarative C# with C# Markup 2 (CSharpForMarkup), instead of XAML. Use for Uno 6 apps on .NET 10/9 with MVVM or MVUX, Uno Extensions Navigation/Toolkit, and supported C# Markup 2 integrations such as LiveCharts2, ScottPlot, and Mapsui./uno-fluent2npx claudepluginhub vincenth-net/dotnet-agentic-engineering --plugin uno-platform