CrissCross.WPF
2.0.5
See the version list below for details.
dotnet add package CrissCross.WPF --version 2.0.5
NuGet\Install-Package CrissCross.WPF -Version 2.0.5
<PackageReference Include="CrissCross.WPF" Version="2.0.5" />
paket add CrissCross.WPF --version 2.0.5
#r "nuget: CrissCross.WPF, 2.0.5"
// Install CrissCross.WPF as a Cake Addin #addin nuget:?package=CrissCross.WPF&version=2.0.5 // Install CrissCross.WPF as a Cake Tool #tool nuget:?package=CrissCross.WPF&version=2.0.5
CrissCross
A Navigation Framework for ReactiveUI based projects
What is CrissCross?
CrissCross is a navigation framework for ReactiveUI based projects. It is designed to be used with ReactiveUI, but could be adapted to be used with any MVVM framework.
Why CrissCross?
CrissCross is designed to be a simple, lightweight, and easy to use navigation framework. It is designed to be used with ReactiveUI.
How do I use CrissCross?
Step 1: Install CrissCross
CrissCross is available on NuGet. You can install it using the NuGet Package Manager:
Install-Package CrissCross
or
Install-Package CrissCross.WPF
or
Install-Package CrissCross.XamForms
or
Install-Package CrissCross.MAUI
or
Install-Package CrissCross.Avalonia
or
Install-Package CrissCross.WinForms
Step 2: Create a ViewModel
Create a ViewModel that inherits from RxObject
. This is the ViewModel that will be used for the MainWindow.
public class MainWindowViewModel : RxObject
{
public MainWindowViewModel()
{
this.BuildComplete(() =>
{
// Do something when the IOC Container is built
});
// Setup the IOC Container
Locator.CurrentMutable.RegisterConstant<MainViewModel>(new());
Locator.CurrentMutable.Register<IViewFor<MainViewModel>>(() => new MainView());
Locator.CurrentMutable.RegisterConstant<FirstViewModel>(new());
Locator.CurrentMutable.Register<IViewFor<FirstViewModel>>(() => new FirstView());
// Notify the application that the IOC Container that it is complete and ready to use.
Locator.CurrentMutable.SetupComplete();
}
}
Step 3: Create a View
Create a View that inherits from NavigationWindow
. This is the View that will be used for the MainWindow.
add xmlns:rxNav="https://github.com/reactivemarbles/CrissCross" to the Window inherits in XAML.
Change Window to rxNav:NavigationWindow in XAML.
Add x:TypeArguments="local:MainWindowViewModel"
public partial class MainWindow : NavigationWindow<MainWindowViewModel>
{
public MainWindow()
{
// Remember to set x:Name in XAML to "mainWindow"
InitializeComponent();
this.WhenActivated(disposables =>
{
// Do something when the View is activated
// Configure the Navigation for the MainWindow
NavBack.Command = ReactiveCommand.Create(() => this.NavigateBack(), CanNavigateBack).DisposeWith(d);
// Navigate to the MainViewModel
this.NavigateToView<MainViewModel>();
});
}
}
Step 4: Create a ViewModel
Create a ViewModel that inherits from RxObject
. This is the ViewModel that will be used for the MainView.
public class MainViewModel : RxObject
{
public MainViewModel()
{
this.BuildComplete(() =>
{
// Do something when the IOC Container is built
// Configure the Navigation for the MainViewModel using, you will pass the name of the Navigation Host Window that you want to navigate with.
this.NavigateBack("mainWindow")
this.CanNavigateBack("mainWindow")
this.NavigateToView<FirstViewModel>("mainWindow")
});
}
}
Step 5: Create a View
Create a View that inherits from ReactiveUserControl
. This is the View that will be used for the MainView.
public partial class MainView : ReactiveUserControl<MainViewModel>
{
public MainView()
{
InitializeComponent();
this.WhenActivated(disposables =>
{
// Do something when the View is activated
});
}
}
Step 6: For WPF Applications Configure Single Instance Application if required
If you want to prevent multiple instances of the application from running at the same time, you can use the Make.SingleInstance
method.
protected override void OnStartup(StartupEventArgs e)
{
// This will prevent multiple instances of the application from running at the same time.
Make.SingleInstance("MyUniqueAppName ddd81fc8-9107-4e33-b848-cac4c3ec3d2a");
base.OnStartup(e);
}
Step 7: Run the application
Run the application and you should see the MainView.
Avalonia
Step 1: Install CrissCross
CrissCross is available on NuGet. You can install it using the NuGet Package Manager:
Install-Package CrissCross.Avalonia
Step 2: Create a ViewModel
Create a ViewModel that inherits from RxObject
. This is the ViewModel that will be used for the MainWindow.
public class MainWindowViewModel : RxObject
{
public MainWindowViewModel()
{
this.BuildComplete(() =>
{
// Do something when the IOC Container is built
});
// Setup the IOC Container
Locator.CurrentMutable.RegisterConstant<MainViewModel>(new());
Locator.CurrentMutable.Register<IViewFor<MainViewModel>>(() => new MainView());
Locator.CurrentMutable.RegisterConstant<FirstViewModel>(new());
Locator.CurrentMutable.Register<IViewFor<FirstViewModel>>(() => new FirstView());
// Notify the application that the IOC Container that it is complete and ready to use.
Locator.CurrentMutable.SetupComplete();
}
}
Step 3: Create a NavigationView
Create a View that inherits from NavigationWindow
OR NavigationUserControl
. This is the View that will be used for the MainWindow.
add xmlns:rxNav="https://github.com/reactivemarbles/CrissCross"
Change Window to rxNav:NavigationWindow in XAML.
OR Change UserControl to rxNav:NavigationUserControl in XAML.
As Avalonia has two modes of operation you will need to select the correct mode for your application.
public partial class MainWindow : NavigationWindow<MainWindowViewModel>
{
public MainWindow()
{
// Remember to set x:Name in XAML to "mainWindow"
InitializeComponent();
this.WhenActivated(disposables =>
{
// Do something when the View is activated
// Configure the Navigation for the MainWindow
NavBack.Command = ReactiveCommand.Create(() => this.NavigateBack(), CanNavigateBack).DisposeWith(d);
// Navigate to the MainViewModel
this.NavigateToView<MainViewModel>();
});
}
}
Step 4: Create a ViewModel
Create a ViewModel that inherits from RxObject
. This is the ViewModel that will be used for the MainView.
public class MainViewModel : RxObject
{
public MainViewModel()
{
this.BuildComplete(() =>
{
// Do something when the IOC Container is built
// Configure the Navigation for the MainViewModel using, you will pass the name of the Navigation Host Window that you want to navigate with.
this.NavigateBack("mainWindow")
this.CanNavigateBack("mainWindow")
this.NavigateToView<FirstViewModel>("mainWindow")
});
}
}
Step 5: Create a View
Create a View that inherits from ReactiveUserControl
. This is the View that will be used for the MainView.
public partial class MainView : ReactiveUserControl<MainViewModel>
{
public MainView()
{
InitializeComponent();
this.WhenActivated(disposables =>
{
// Do something when the View is activated
});
}
}
CrissCross.WPF.Plot
CrissCross.WPF.Plot is a library that provides a simple way to plot data in WPF applications. It is designed to be used with CrissCross.
Adriana Segher came up with the initial concept of creating a Plot that could accept a Reactive data source. This was then developed into a library that could be used with CrissCross Wpf.
The library is built on top of ScottPlot and provides a simple way to plot Reactive data in WPF applications.
The library is available on NuGet. You can install it using the NuGet Package Manager:
Install-Package CrissCross.WPF.Plot
Current Features
- Plot data from a Reactive data source
- Plot data from a array of Reactive data source with multiple series (limited to 9 currently)
- Cursor tracking via a CrossHair
- Zooming and Panning
- Dragging a zoom area
- Visibility of plots
- Auto Scale / Manual Scale
- Enable / Disable interaction with the plot
- Multiple Y Axis
Future Features
- More than 9 series
- Configuration of the Chart through a property dialog
- Axis configuration, Color Configuration, Scale Configuration, Line Configuration
- Multiple CrossHairs with differential analytics
- Multiple X Axis for XY Plots
- Select a plotalbe data from a large data source such as a Dynamic Data Source
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0-windows10.0.17763 is compatible. net7.0-windows was computed. net8.0-windows was computed. net8.0-windows10.0.17763 is compatible. |
.NET Framework | net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 is compatible. net48 is compatible. net481 was computed. |
-
.NETFramework 4.6.2
- CrissCross (>= 2.0.5)
- Microsoft.Web.WebView2 (>= 1.0.2646-prerelease)
- ReactiveUI.WPF (>= 20.1.1)
-
.NETFramework 4.7.2
- CrissCross (>= 2.0.5)
- Microsoft.Web.WebView2 (>= 1.0.2646-prerelease)
- ReactiveUI.WPF (>= 20.1.1)
-
.NETFramework 4.8
- CrissCross (>= 2.0.5)
- Microsoft.Web.WebView2 (>= 1.0.2646-prerelease)
- ReactiveUI.WPF (>= 20.1.1)
-
net6.0-windows10.0.17763
- CrissCross (>= 2.0.5)
- Microsoft.Web.WebView2 (>= 1.0.2646-prerelease)
- ReactiveUI.WPF (>= 20.1.1)
-
net8.0-windows10.0.17763
- CrissCross (>= 2.0.5)
- Microsoft.Web.WebView2 (>= 1.0.2646-prerelease)
- ReactiveUI.WPF (>= 20.1.1)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on CrissCross.WPF:
Package | Downloads |
---|---|
CrissCross.WPF.UI
A Reactive Navigation Framework for ReactiveUI |
|
CrissCross.WPF.Plot
A Reactive Navigation Framework for ReactiveUI |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
2.2.1 | 81 | 11/25/2024 |
2.2.0 | 73 | 11/18/2024 |
2.1.3 | 104 | 11/7/2024 |
2.1.2 | 83 | 11/5/2024 |
2.1.1 | 104 | 11/5/2024 |
2.1.0 | 96 | 10/13/2024 |
2.0.6 | 154 | 8/2/2024 |
2.0.5 | 97 | 8/1/2024 |
2.0.4 | 78 | 7/31/2024 |
2.0.3 | 85 | 7/28/2024 |
2.0.2 | 86 | 7/25/2024 |
2.0.1 | 105 | 7/10/2024 |
2.0.0 | 135 | 5/18/2024 |
1.0.25 | 179 | 4/30/2024 |
1.0.24 | 119 | 4/19/2024 |
1.0.23 | 116 | 4/10/2024 |
1.0.22 | 105 | 3/29/2024 |
1.0.21 | 101 | 3/26/2024 |
1.0.20 | 126 | 3/22/2024 |
1.0.19 | 113 | 3/21/2024 |
1.0.18 | 125 | 3/19/2024 |
1.0.17 | 127 | 3/14/2024 |
1.0.16 | 127 | 3/13/2024 |
1.0.15 | 123 | 3/12/2024 |
1.0.14 | 119 | 3/11/2024 |
1.0.13 | 121 | 3/8/2024 |
1.0.12 | 115 | 3/7/2024 |
1.0.11 | 106 | 3/5/2024 |
1.0.10 | 128 | 2/22/2024 |
1.0.9 | 116 | 2/21/2024 |
1.0.8 | 118 | 2/21/2024 |
1.0.7 | 114 | 2/19/2024 |
1.0.6 | 115 | 2/16/2024 |
1.0.5 | 149 | 2/8/2024 |
1.0.4 | 194 | 1/4/2024 |
1.0.3 | 201 | 9/11/2023 |
1.0.2 | 157 | 9/9/2023 |
1.0.1 | 158 | 9/8/2023 |
1.0.0 | 143 | 9/7/2023 |
0.9.2 | 164 | 9/6/2023 |
0.9.1 | 181 | 8/6/2023 |
0.9.0 | 160 | 7/12/2023 |
0.8.0 | 166 | 6/23/2023 |
0.7.1 | 195 | 4/28/2023 |
0.7.0 | 221 | 3/14/2023 |
0.6.0 | 222 | 3/13/2023 |
0.5.0 | 219 | 3/11/2023 |
0.2.0 | 261 | 2/7/2023 |
0.1.0 | 281 | 1/7/2023 |
Compatability with Net 6/8 and netstandard2.0