CrissCross.WPF.UI
2.2.1
dotnet add package CrissCross.WPF.UI --version 2.2.1
NuGet\Install-Package CrissCross.WPF.UI -Version 2.2.1
<PackageReference Include="CrissCross.WPF.UI" Version="2.2.1" />
paket add CrissCross.WPF.UI --version 2.2.1
#r "nuget: CrissCross.WPF.UI, 2.2.1"
// Install CrissCross.WPF.UI as a Cake Addin #addin nuget:?package=CrissCross.WPF.UI&version=2.2.1 // Install CrissCross.WPF.UI as a Cake Tool #tool nuget:?package=CrissCross.WPF.UI&version=2.2.1
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
CrissCross.WPF.WebView2
CrissCross.WPF.Webview2 is a control for Wpf allowing the placement of other wpf controls on top of the WebView2. The base Microsoft.Web.WebView2 library has a WebView2CompositionControl but this is only targeting net46 and does not work for net core.
In CrissCross.WPF.Webview2 we have created a WebView2Wpf control that has the majority of the features that the WebView2CompositionControl has working, however some use an underlying private layer which we don't have access to. Further Documentation can be found here microsoft.web.webview2.wpf
The library is available on NuGet. You can install it using the NuGet Package Manager:
xmlns:webv="https://github.com/reactivemarbles/CrissCross"
<webv:WebView2Wpf
x:Name="WebView2Wpf"
AutoDispose="True">
<--! Add your Xaml here -->
</webv:WebView2Wpf>
// In Code behind set the Source to the Uri you wish to navigate to, this can be set in the Xaml too.
WebView2Wpf.Source = new System.Uri("https://www.reactiveui.net/");
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0-windows10.0.17763 is compatible. net9.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
- AppBarButton.WPF (>= 1.0.2)
- BBCode.WPF (>= 0.2.0)
- CompiledBindings.WPF (>= 1.0.18)
- CP.Extensions.Hosting.ReactiveUI.Wpf (>= 2.0.5)
- CP.Xaml.Converters (>= 1.0.2)
- CrissCross.WPF (>= 2.2.1)
- Microsoft.Extensions.DependencyInjection (>= 9.0.0)
- Microsoft.Extensions.Logging (>= 9.0.0)
- Microsoft.Extensions.Logging.Debug (>= 9.0.0)
- Microsoft.Xaml.Behaviors.Wpf (>= 1.1.135)
- Newtonsoft.Json (>= 13.0.3)
- ReactiveList (>= 2.1.0)
- System.Net.Http (>= 4.3.4)
- System.Text.Json (>= 9.0.0)
-
.NETFramework 4.7.2
- AppBarButton.WPF (>= 1.0.2)
- BBCode.WPF (>= 0.2.0)
- CompiledBindings.WPF (>= 1.0.18)
- CP.Extensions.Hosting.ReactiveUI.Wpf (>= 2.0.5)
- CP.Xaml.Converters (>= 1.0.2)
- CrissCross.WPF (>= 2.2.1)
- Microsoft.Extensions.DependencyInjection (>= 9.0.0)
- Microsoft.Extensions.Logging (>= 9.0.0)
- Microsoft.Extensions.Logging.Debug (>= 9.0.0)
- Microsoft.Xaml.Behaviors.Wpf (>= 1.1.135)
- Newtonsoft.Json (>= 13.0.3)
- ReactiveList (>= 2.1.0)
- System.Net.Http (>= 4.3.4)
- System.Text.Json (>= 9.0.0)
-
.NETFramework 4.8
- AppBarButton.WPF (>= 1.0.2)
- BBCode.WPF (>= 0.2.0)
- CompiledBindings.WPF (>= 1.0.18)
- CP.Extensions.Hosting.ReactiveUI.Wpf (>= 2.0.5)
- CP.Xaml.Converters (>= 1.0.2)
- CrissCross.WPF (>= 2.2.1)
- Microsoft.Extensions.DependencyInjection (>= 9.0.0)
- Microsoft.Extensions.Logging (>= 9.0.0)
- Microsoft.Extensions.Logging.Debug (>= 9.0.0)
- Microsoft.Xaml.Behaviors.Wpf (>= 1.1.135)
- Newtonsoft.Json (>= 13.0.3)
- ReactiveList (>= 2.1.0)
- System.Net.Http (>= 4.3.4)
- System.Text.Json (>= 9.0.0)
-
net8.0-windows10.0.17763
- AppBarButton.WPF (>= 1.0.2)
- BBCode.WPF (>= 0.2.0)
- CompiledBindings.WPF (>= 1.0.18)
- CP.Extensions.Hosting.ReactiveUI.Wpf (>= 2.0.5)
- CP.Xaml.Converters (>= 1.0.2)
- CrissCross.WPF (>= 2.2.1)
- Microsoft.Extensions.DependencyInjection (>= 9.0.0)
- Microsoft.Extensions.Logging (>= 9.0.0)
- Microsoft.Extensions.Logging.Debug (>= 9.0.0)
- Microsoft.Xaml.Behaviors.Wpf (>= 1.1.135)
- Newtonsoft.Json (>= 13.0.3)
- ReactiveList (>= 2.1.0)
- System.Text.Json (>= 9.0.0)
-
net9.0-windows10.0.17763
- AppBarButton.WPF (>= 1.0.2)
- BBCode.WPF (>= 0.2.0)
- CompiledBindings.WPF (>= 1.0.18)
- CP.Extensions.Hosting.ReactiveUI.Wpf (>= 2.0.5)
- CP.Xaml.Converters (>= 1.0.2)
- CrissCross.WPF (>= 2.2.1)
- Microsoft.Extensions.DependencyInjection (>= 9.0.0)
- Microsoft.Extensions.Logging (>= 9.0.0)
- Microsoft.Extensions.Logging.Debug (>= 9.0.0)
- Microsoft.Xaml.Behaviors.Wpf (>= 1.1.135)
- Newtonsoft.Json (>= 13.0.3)
- ReactiveList (>= 2.1.0)
- System.Text.Json (>= 9.0.0)
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 |
---|---|---|
2.2.1 | 164 | 11/25/2024 |
2.2.0 | 117 | 11/18/2024 |
2.1.3 | 143 | 11/7/2024 |
2.1.2 | 129 | 11/5/2024 |
2.1.1 | 144 | 11/5/2024 |
2.1.0 | 139 | 10/13/2024 |
2.0.6 | 159 | 8/2/2024 |
2.0.5 | 80 | 8/1/2024 |
2.0.4 | 87 | 7/31/2024 |
2.0.3 | 109 | 7/28/2024 |
2.0.2 | 117 | 7/25/2024 |
2.0.1 | 148 | 7/10/2024 |
2.0.0 | 147 | 5/18/2024 |
1.0.25 | 255 | 4/30/2024 |
1.0.24 | 136 | 4/19/2024 |
1.0.23 | 160 | 4/10/2024 |
1.0.22 | 165 | 3/29/2024 |
1.0.21 | 159 | 3/26/2024 |
1.0.20 | 168 | 3/22/2024 |
1.0.19 | 178 | 3/21/2024 |
1.0.18 | 174 | 3/19/2024 |
1.0.17 | 169 | 3/14/2024 |
1.0.16 | 161 | 3/13/2024 |
1.0.15 | 138 | 3/12/2024 |
1.0.14 | 145 | 3/11/2024 |
1.0.13 | 169 | 3/8/2024 |
1.0.12 | 138 | 3/7/2024 |
1.0.11 | 160 | 3/5/2024 |
1.0.10 | 132 | 2/22/2024 |
1.0.9 | 152 | 2/21/2024 |
1.0.8 | 152 | 2/21/2024 |
1.0.7 | 124 | 2/19/2024 |
1.0.6 | 127 | 2/16/2024 |
1.0.5 | 145 | 2/8/2024 |
Compatability with Net 8/9 and netstandard2.0