Ansight.Tools.Maui 0.1.0-preview.20

This is a prerelease version of Ansight.Tools.Maui.
dotnet add package Ansight.Tools.Maui --version 0.1.0-preview.20
                    
NuGet\Install-Package Ansight.Tools.Maui -Version 0.1.0-preview.20
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Ansight.Tools.Maui" Version="0.1.0-preview.20" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Ansight.Tools.Maui" Version="0.1.0-preview.20" />
                    
Directory.Packages.props
<PackageReference Include="Ansight.Tools.Maui" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Ansight.Tools.Maui --version 0.1.0-preview.20
                    
#r "nuget: Ansight.Tools.Maui, 0.1.0-preview.20"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Ansight.Tools.Maui@0.1.0-preview.20
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Ansight.Tools.Maui&version=0.1.0-preview.20&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Ansight.Tools.Maui&version=0.1.0-preview.20&prerelease
                    
Install as a Cake Tool

Ansight.Tools.Maui

Grouped .NET MAUI inspection and mutation tools for the Ansight .NET SDK.

License

The Ansight SDK is source-available software under the Ansight SDK Source-Available License. It is not open-source software. Production use is licensed only for use with Ansight Services.

Registered tools:

  • maui.get_current_page
  • maui.get_visual_tree
  • maui.find_elements
  • maui.get_element
  • maui.get_bindable_property
  • maui.set_bindable_property
  • maui.clear_bindable_property
  • maui.inflate_xaml
  • maui.add_element
  • maui.remove_element
  • maui.set_app_theme
  • maui.get_binding_context
  • maui.get_bindings
  • maui.get_resource_state
  • maui.get_navigation_state
  • maui.invoke_element_action
  • maui.wait_for_ui
  • maui.get_layout_diagnostics
  • maui.get_handler_diagnostics
  • maui.invoke_binding_context_command
  • maui.set_binding_context_property

Usage

using Ansight;
using Ansight.Tools.Maui;

var options = Options.CreateBuilder()
    .WithMauiTools()
    .WithReadWriteToolAccess()
    .Build();

The visual tree and search tools return MAUI element ids that can be passed to the element, bindable-property, binding, layout, handler, action, wait, XAML experiment, theme, and binding-context tools. Write-scoped tools require WithReadWriteToolAccess() or a custom ToolGuard.

Custom controls that render their own child model, such as Mapbox, Skia, or native-hosted controls, can register visual-tree extensions. A child walker exposes additional real MAUI Element children to search and node resolution. A child builder exposes synthetic visual-tree nodes for drawn/native items that are not MAUI elements:

using System.Text.Json.Nodes;
using Ansight.Tools.Maui;
using Microsoft.Maui.Graphics;

var registration = MauiVisualTreeRegistry.RegisterChildBuilder<MyMapView>((mapView, context) =>
    mapView.VisibleMarkers.Select(marker => new MauiVisualTreeNode(
        context.CreateChildId(marker.Id),
        "MyApp.MapMarker",
        "mapMarker")
    {
        Label = marker.Title,
        Bounds = new Rect(marker.X, marker.Y, marker.Width, marker.Height),
        Properties = new JsonObject
        {
            ["layer"] = marker.LayerName,
            ["selected"] = marker.IsSelected
        }
    }));

Keep the returned IDisposable for the lifetime of the registration and dispose it to unregister. Synthetic nodes appear in maui.get_visual_tree; only real Element children returned by a child walker can be resolved later by element mutation or property tools.

maui.inflate_xaml creates and retains a detached MAUI element from an arbitrary XAML string using LoadFromXaml. The returned node id can be passed to maui.add_element to attach it under a live layout or content control, and maui.remove_element can detach it again without restarting the app.

maui.set_app_theme changes Application.Current.UserAppTheme to light, dark, or system at runtime.

These tools are intended for local debugging only. Broad visual-tree labels are PII-safe by default: typed Entry, Editor, and SearchBar text, picker selections, dates, times, toggle states, slider values, and sensitive-looking text are omitted or redacted. Resource values and binding-context property snapshots are opt-in; by default resource inspection returns keys/types and binding-context inspection returns metadata only. Explicit value-reading tools can still reveal app data, binding expressions, binding-context object state, handler metadata, and mutate live UI, app theme, or view-model state.

Build-time remote tool policy

Projects that reference this package are covered by AnsightRemoteToolsPolicy. The default AllowedWithWarnings policy logs detected tool type and assembly details and emits a build warning when remote tools are included. Because this package contains remote tools, Disallowed only succeeds when the package is omitted from that build, for example with Debug-only package references. Use Allowed to bypass remote tool scanning and warnings. Set AnsightLogRemoteTools=false to suppress the detected-tool list.

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-android35.0 is compatible.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-ios18.0 is compatible.  net9.0-maccatalyst was computed.  net9.0-maccatalyst18.0 is compatible.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Ansight.Tools.Maui:

Package Downloads
Ansight.Maui

All-in-one Ansight SDK package for .NET MAUI apps, including core runtime, pairing, remote tools, automatic lifecycle and page-view telemetry, and MAUI inspection tools.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0-preview.20 0 5/15/2026
0.1.0-preview.19 59 5/8/2026
0.1.0-preview.18 57 5/8/2026
0.1.0-preview.17 49 5/8/2026
0.1.0-preview.16 56 5/6/2026
0.1.0-preview.15 50 5/5/2026
0.1.0-preview.14 55 5/5/2026
0.1.0-preview.13 48 5/5/2026
0.1.0-pre9 49 5/3/2026
0.1.0-pre8 56 5/3/2026
0.1.0-pre7 46 4/30/2026
0.1.0-pre6 43 4/30/2026
0.1.0-pre5 42 4/30/2026
0.1.0-pre4 56 4/27/2026
0.1.0-pre3 59 4/21/2026
0.1.0-pre12 50 5/4/2026
0.1.0-pre11 59 5/4/2026
0.1.0-pre10 48 5/3/2026