VOOZH about

URL: https://www.nuget.org/packages/CrissCross.XamForms/

โ‡ฑ NuGet Gallery | CrissCross.XamForms 3.0.2


๏ปฟ

๐Ÿ‘ Image
CrissCross.XamForms 3.0.2

dotnet add package CrissCross.XamForms --version 3.0.2
 
 
NuGet\Install-Package CrissCross.XamForms -Version 3.0.2
 
 
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="CrissCross.XamForms" Version="3.0.2" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CrissCross.XamForms" Version="3.0.2" />
 
Directory.Packages.props
<PackageReference Include="CrissCross.XamForms" />
 
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 CrissCross.XamForms --version 3.0.2
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: CrissCross.XamForms, 3.0.2"
 
 
#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 CrissCross.XamForms@3.0.2
 
 
#: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=CrissCross.XamForms&version=3.0.2
 
Install as a Cake Addin
#tool nuget:?package=CrissCross.XamForms&version=3.0.2
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

CrissCross

A navigation framework and set of UI components for ReactiveUI-based applications across WPF, Avalonia, MAUI, and WinForms.

๐Ÿ‘ CrissCross CI-Build

Overview

CrissCross provides ViewModel-first navigation, hostable navigation surfaces, and a comprehensive WPF UI control set with a strong ReactiveUI focus. It promotes:

  • ViewModel-first navigation using ReactiveUI๏ฟฝs IViewFor and WhenActivated
  • Host-based navigation via named ViewModelRoutedViewHost containers
  • Consistent navigation lifecycle notifications (WhenNavigating/WhenNavigatedTo/From)
  • Easy DI/IoC integration via Splat and Microsoft.Extensions.Hosting
  • A large library of fluent WPF UI controls and services (dialogs, snackbars, themes)

Supported platforms and packages:

  • Core: CrissCross (ReactiveUI helpers and navigation abstractions)
  • WPF navigation host: CrissCross.WPF
  • WPF UI control library: CrissCross.WPF.UI
  • Avalonia host: CrissCross.Avalonia
  • .NET MAUI helpers: CrissCross.MAUI
  • WinForms host: CrissCross.WinForms
  • WPF WebView2 overlay host: CrissCross.WPF.WebView2
  • WPF Plot control suite: CrissCross.WPF.Plot

NuGet packages:

Note: Xamarin.Forms support exists in separate projects but for new apps prefer .NET MAUI.


Core Concepts

CrissCross builds on ReactiveUI to provide ViewModel-first navigation:

  • IRxObject: Base ViewModel type used throughout CrissCross
  • IViewFor<TViewModel>: ReactiveUI contract mapping VMs to Views
  • WhenActivated: ReactiveUI activation lifecycle for Views
  • ViewModelRoutedViewHost: Navigation host control that manages a navigation stack and view transitions
  • HostName: A host identifier (string) that allows targeting navigation to a specific host
  • Navigation lifecycle: WhenNavigating, WhenNavigatedTo, WhenNavigatedFrom via mixins/events

Register your ViewModels and Views with Splat๏ฟฝs Locator or Microsoft.Extensions.DependencyInjection. CrissCross uses the locator to resolve Views for navigation targets.


Quick Start (WPF)

  1. Install packages
  • CrissCross
  • CrissCross.WPF
  • CrissCross.WPF.UI (for controls/themes)
  1. Register ViewModels and Views
public class AppBootstrapper : RxObject
{
 public AppBootstrapper()
 {
 this.BuildComplete(() =>
 {
 // Example VM/View registrations using Splat
 AppLocator.CurrentMutable.RegisterConstant(new MainViewModel());
 AppLocator.CurrentMutable.Register<IViewFor<MainViewModel>>(() => new MainView());

 AppLocator.CurrentMutable.RegisterConstant(new FirstViewModel());
 AppLocator.CurrentMutable.Register<IViewFor<FirstViewModel>>(() => new FirstView());

 AppLocator.CurrentMutable.SetupComplete();
 });
 }
}
  1. Create a navigation host (NavigationWindow)
public partial class MainWindow : NavigationWindow<MainWindowViewModel>
{
 public MainWindow()
 {
 InitializeComponent(); // Ensure x:Name is set on the Window (e.g., "mainWindow")

 this.WhenActivated(d =>
 {
 // Bind back command, etc
 NavBack.Command = ReactiveCommand.Create(() => this.NavigateBack(), CanNavigateBack).DisposeWith(d);

 // Navigate to a start VM
 this.NavigateToView<MainViewModel>();
 });
 }
}
  1. Navigate from a ViewModel
public class MainViewModel : RxObject
{
 public MainViewModel()
 {
 this.BuildComplete(() =>
 {
 // Target a specific host by name (Window x:Name)
 this.NavigateToView<FirstViewModel>("mainWindow");
 });
 }
}
  1. Create a View
public partial class MainView : ReactiveUserControl<MainViewModel>
{
 public MainView()
 {
 InitializeComponent();
 this.WhenActivated(_ => { /* bindings, commands */ });
 }
}

Hosts and Navigation APIs

  • NavigationWindow (WPF): A Window that exposes a ViewModelRoutedViewHost and transition support

    • Properties: Transition, NavigateBackIsEnabled
    • Exposes CanNavigateBack observable and NavigateBack() helper
  • FluentNavigationWindow (WPF UI): A fluent-styled NavigationWindow with additional title content areas and Transition

  • NavigationUserControl (WPF UI, Avalonia): A hostable control version of the navigation container (for regions/panels)

  • ViewModelRoutedViewHost (WPF): Core host implementation

    • Navigate<TViewModel>(contract, parameter)
    • Navigate(IRxObject vm, contract, parameter)
    • NavigateAndReset variants
    • NavigateBack(parameter)
    • CanNavigateBackObservable, NavigationStack
    • Lifecycle events routed via ViewModelRoutedViewHostMixins:
      • WhenNavigating: preview/cancel navigation
      • WhenNavigatedTo/From: after navigation completes
  • HostName: Set on NavigationWindow/NavigationUserControl (typically from x:Name) to route cross-host navigation

Navigation from Views and ViewModels

  • From code-behind: this.NavigateToView<TViewModel>(hostName?, parameter?)
  • From ViewModel: this.NavigateToView<TViewModel>(hostName, parameter?)
  • NavigateBack(hostName?, parameter?) and CanNavigateBack(hostName?) helpers

WPF UI Library (CrissCross.WPF.UI)

A comprehensive set of fluent controls and services designed for ReactiveUI apps. Highlights include:

  • NavigationView, BreadcrumbBar and navigation controls/models
  • Dialogs: ContentDialog, MessageBox, async variants
  • Notifications: Snackbar, InfoBar, InfoBadge
  • Input: AutoSuggestBox, NumberBox, PasswordBox, ToggleSwitch, TimePicker, DatePicker
  • Lists and virtualization: ListView, VirtualizingGridView, VirtualizingWrapPanel
  • Layout/containers: Card, CardExpander, GroupBox, Grid, StackPanel
  • Media: GifImage (animation), Image
  • PersonPicture, RatingControl, ProgressRing, AppBar, TitleBar, Window enhancements
  • Color controls: ColorSelector suite (sliders, dual pickers), HexColorTextBox, and ColorPicker
  • Typography and iconography: FontIcon, SymbolIcon, IconSource
  • Themes and appearance utilities

Include the control resources by merging the ControlsDictionary:

<Application.Resources>
 <ResourceDictionary>
 <ResourceDictionary.MergedDictionaries>
 <ui:ControlsDictionary />
 </ResourceDictionary.MergedDictionaries>
 </ResourceDictionary>
</Application.Resources>

Theming and Appearance

  • ApplicationThemeManager and SystemThemeWatcher for light/dark and system theme integration
  • Resource dictionaries for typography, colors, focus, default styles
  • ThemeService and IThemeService for programmatic control

Services

  • ContentDialogService: Show dialogs and await results
  • SnackbarService: Host snackbars with extension helpers
  • PageService (WPF UI): Resolve pages by type for embedded/hosted scenarios

WPF Page Navigation (Host Builder)

For page-based apps using WPF UI, use the host builder extensions:

private static readonly IHost _host = Host.CreateDefaultBuilder()
 .ConfigureCrissCrossForPageNavigation<MainWindow, DashboardPage>()
 .ConfigureServices((context, services) =>
 {
 services.AddSingleton<MainWindowViewModel>();
 services.AddSingleton<DashboardPage>().AddSingleton<DashboardViewModel>();
 services.AddSingleton<DataPage>().AddSingleton<DataViewModel>();
 services.AddSingleton<SettingsPage>().AddSingleton<SettingsViewModel>();
 services.AddSingleton<LoginPage>().AddSingleton<LoginViewModel>();
 })
 .Build();

Wire up and start in App.xaml.cs, then navigate using IPageService or NavigationView.


NavigationView (WPF UI)

A powerful navigation control that manages a journal and hierarchical navigation stack:

  • Navigate(Type pageType, object? dataContext)
  • Navigate(string pageIdOrTargetTag, object? dataContext)
  • NavigateWithHierarchy(Type pageType, object? dataContext)
  • ReplaceContent(Type pageType) / ReplaceContent(UIElement)
  • GoBack(), GoForward() (where implemented), ClearJournal()
  • Events: Navigating (cancelable), Navigated, BackRequested, SelectionChanged, PaneOpened/Closed

The control maintains a NavigationStack and history so you can build rich shell navigation experiences.


Avalonia

  • NavigationUserControl (host)
  • ViewModelRoutedViewHost equivalent with CanNavigateBack observable and HostName
  • Use ReactiveUI๏ฟฝs WhenActivated and Splat for registration as in WPF
public partial class MainUserControl : NavigationUserControl<MainWindowViewModel>
{
 public MainUserControl()
 {
 InitializeComponent();
 this.WhenActivated(d =>
 {
 this.NavigateToView<MainViewModel>();
 _NavBack!.Command = ReactiveCommand.Create(() => this.NavigateBack(), this.CanNavigateBack()).DisposeWith(d);
 });
 }
}

.NET MAUI

MAUI helpers integrate with ReactiveUI.Maui. Register your VMs/Views with DI and navigate using the same NavigateToView/Back helpers where applicable. Prefer this approach over Xamarin.Forms for new apps.

Packages:

  • CrissCross.MAUI
  • ReactiveUI.Maui

WinForms

  • ViewModelRoutedViewHost for WinForms
  • ReactiveUserControl<TViewModel> usage with WhenActivated
  • Navigate using the same helper mixins

WPF WebView2 Overlay Host

CrissCross.WPF.WebView2 provides a NavigationWebView that hosts WebView2 while allowing WPF content overlays:

xmlns:webv="https://github.com/reactivemarbles/CrissCross"
<webv:WebView2Wpf x:Name="WebView2Wpf" AutoDispose="True">
 
</webv:WebView2Wpf>
WebView2Wpf.Source = new Uri("https://www.reactiveui.net/");

WPF Plot (ScottPlot-based)

CrissCross.WPF.Plot adds Reactive plotting components:

  • Bind reactive sequences
  • Multiple series, Y-axes, crosshairs
  • Zoom/pan, drag zoom selection
  • Visibility toggles, auto/manual scale

Install: Install-Package CrissCross.WPF.Plot


Settings and Tracking (WPF UI)

Persist and track control/window state:

  • Tracker service with attributes (Trackable, PersistOn, StopTrackingOn)
  • Example usage in App.xaml.cs wiring window size/position persistence
_tracker?.Configure<MainWindow>()
 .Id(w => w.Name, $"[Width={SystemParameters.VirtualScreenWidth},Height{SystemParameters.VirtualScreenHeight}]")
 .Properties(w => new { w.Height, w.Width, w.Left, w.Top, w.WindowState })
 .PersistOn(w => nameof(w.Closing))
 .StopTrackingOn(w => nameof(w.Closing));

Color and Media Controls (WPF UI)

  • ColorSelector suite (HSV/HSL/RGB sliders, square pickers, hex entry, dual color with hints)
  • ColorPicker control: A simple RGBA + Hex picker with a live preview
  • GifImage with animation control and performance-oriented decoding/animation components

Samples

  • CrissCross.WPF.UI.Test: WPF UI test app with page navigation
  • CrissCross.WPF.Test: WPF navigation sample
  • CrissCross.Avalonia.Test.*: Avalonia samples (desktop, mobile)
  • CrissCross.MAUI.Test: MAUI sample
  • CrissCross.WPF.Plot.Test: Plot samples
  • CrissCross.WPF.WebView2.Test: WebView2 overlay usage
  • CrissCross.WPF.UI.Gallery: Control gallery showcasing WPF UI controls

Browse these projects to see real-world usage patterns, navigation setup, and control bindings.


Single Instance (WPF)

Prevent multiple instances using Make.SingleInstance in App:

protected override void OnStartup(StartupEventArgs e)
{
 Make.SingleInstance("MyUniqueAppName ddd81fc8-9107-4e33-b848-cac4c3ec3d2a");
 base.OnStartup(e);
}

Contributing

Issues and PRs are welcome. Please include platform, .NET version, and a minimal repro where applicable.


License

MIT ๏ฟฝ ReactiveUI Association Incorporated

Product Versions Compatible and additional computed target framework versions.
.NET net5.0 net5.0 was computed.  net5.0-windows net5.0-windows was computed.  net6.0 net6.0 was computed.  net6.0-android net6.0-android was computed.  net6.0-ios net6.0-ios was computed.  net6.0-maccatalyst net6.0-maccatalyst was computed.  net6.0-macos net6.0-macos was computed.  net6.0-tvos net6.0-tvos was computed.  net6.0-windows net6.0-windows was computed.  net7.0 net7.0 was computed.  net7.0-android net7.0-android was computed.  net7.0-ios net7.0-ios was computed.  net7.0-maccatalyst net7.0-maccatalyst was computed.  net7.0-macos net7.0-macos was computed.  net7.0-tvos net7.0-tvos was computed.  net7.0-windows net7.0-windows was computed.  net8.0 net8.0 is compatible.  net8.0-android net8.0-android was computed.  net8.0-browser net8.0-browser was computed.  net8.0-ios net8.0-ios was computed.  net8.0-maccatalyst net8.0-maccatalyst was computed.  net8.0-macos net8.0-macos was computed.  net8.0-tvos net8.0-tvos was computed.  net8.0-windows net8.0-windows was computed.  net9.0 net9.0 is compatible.  net9.0-android net9.0-android was computed.  net9.0-browser net9.0-browser was computed.  net9.0-ios net9.0-ios was computed.  net9.0-maccatalyst net9.0-maccatalyst was computed.  net9.0-macos net9.0-macos was computed.  net9.0-tvos net9.0-tvos was computed.  net9.0-windows net9.0-windows was computed.  net10.0 net10.0 was computed.  net10.0-android net10.0-android was computed.  net10.0-browser net10.0-browser was computed.  net10.0-ios net10.0-ios was computed.  net10.0-maccatalyst net10.0-maccatalyst was computed.  net10.0-macos net10.0-macos was computed.  net10.0-tvos net10.0-tvos was computed.  net10.0-windows net10.0-windows was computed. 
.NET Core netcoreapp2.0 netcoreapp2.0 was computed.  netcoreapp2.1 netcoreapp2.1 was computed.  netcoreapp2.2 netcoreapp2.2 was computed.  netcoreapp3.0 netcoreapp3.0 was computed.  netcoreapp3.1 netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 netstandard2.0 is compatible.  netstandard2.1 netstandard2.1 was computed. 
.NET Framework net461 net461 was computed.  net462 net462 was computed.  net463 net463 was computed.  net47 net47 was computed.  net471 net471 was computed.  net472 net472 was computed.  net48 net48 was computed.  net481 net481 was computed. 
MonoAndroid monoandroid monoandroid was computed. 
MonoMac monomac monomac was computed. 
MonoTouch monotouch monotouch was computed. 
Tizen tizen40 tizen40 was computed.  tizen60 tizen60 was computed. 
Xamarin.iOS xamarinios xamarinios was computed. 
Xamarin.Mac xamarinmac xamarinmac was computed. 
Xamarin.TVOS xamarintvos xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.0.2 264 1/12/2026
2.6.60 152 1/7/2026
2.6.57 144 1/5/2026
2.6.55 231 12/22/2025
2.6.22 727 12/2/2025
2.6.20 400 11/17/2025
2.6.17 346 11/12/2025
2.6.14 207 11/8/2025
2.6.2 328 9/15/2025
2.5.4 269 9/2/2025
2.5.3 269 9/1/2025
2.5.2 293 6/24/2025
2.5.1 421 6/12/2025
2.5.0 217 5/31/2025
2.4.1 303 4/1/2025
2.4.0 276 4/1/2025
2.3.0 269 3/28/2025
2.2.8 297 3/16/2025
2.2.7 330 3/12/2025
2.2.6 280 2/19/2025
Loading failed

Compatability with Net 8/9/10 and netstandard2.0