dchaib / caliburn.micro.reactiveui Goto Github PK
View Code? Open in Web Editor NEWCaliburn.Micro screens and conductors rewritten to inherit from ReactiveUI ReactiveObject
License: MIT License
Caliburn.Micro screens and conductors rewritten to inherit from ReactiveUI ReactiveObject
License: MIT License
Caliburn micro has released 3.0.0 version supporting some new controls of UWP. Can someone please update the version of caliburn here to 3.0.0
Create empty WPF project.
Add Caliburn.Micro.Start (v2) and make required changes. Change ShellViewModel to derive from Screen. Project runs.
Add Calilburn.Micro.ReactiveUI. Project runs.
Change ShellViewModel to derive from ReactiveScreen. Project runs.
Update Nuget packages to latest stable versions (rx 2.2.4, rxUI 5.5.1). Project runs.
Update rxUi to 5.99.6 beta. Need to manually add Splat 1.3.1. Project fails to run
An exception of type 'System.TypeLoadException' occurred in Caliburn.Micro.ReactiveUI.dll but was not handled in user code
Additional information: Could not load type 'ReactiveUI.ReactiveObjectExpressionMixin' from assembly 'ReactiveUI, Version=5.99.6.0, Culture=neutral, PublicKeyToken=null'.
To show how to use this library in a WPF application (for those who aren't familiar with it), you could add a sample to the repository which reuses one of the Caliburn.Micro samples from here:
Caliburn.Micro has added support for CallerMemberName. Synchronize your implementation with Caliburn.Micro. e.g. something like:
/// <summary>
/// Notifies subscribers of the property change.
/// </summary>
/// <param name = "propertyName">Name of the property.</param>
#if NET || SILVERLIGHT
public virtual void NotifyOfPropertyChange(string propertyName) {
#else
public virtual void NotifyOfPropertyChange([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) {
#endif
if (IsNotifying) {
Execute.OnUIThread(() => OnPropertyChanged(new PropertyChangedEventArgs(propertyName)));
}
}
Instead of duplicating Caliburn.Micro source, I think it would be better to use an approach like:
Using ReactiveUI with MVVM Light (or any other framework!)
This would reduce your work, if Caliburn.Micro gets updated/changed. As currently you have to replicate all changes of a new Caliburn.Micro version.
I am getting this exception at runtime:
Exception thrown: 'System.IO.FileLoadException' in Caliburn.Micro.ReactiveUI.dll
Additional information: Could not load file or assembly 'System.Reactive.Interfaces, Version=2.2.5.0
I need to use System.Reactive.Interfaces version 3.1.1. I also have ReactiveUI.dll version 7.1.0 and Caliburn.Micro version 3.0.3.
I wonder how many other people are trying the nuget package and giving up, assuming this is obsolete?
It would be really cool if these two items were merged. Currently if you fire an event on one the other doesn't know about it, and vice versa.
Caliburn.Micro has IObservableCollection which represents what we might call ReactiveList in ReactiveUI. But currently ReactiveList is not readily assignable as IObservableCollection. We might need to add a Type so we can do this
IObservableCollection myNumbers = new ReactiveCaliburnList();
For Caliburn.Micro it would be the best to use the latest sources as starting point, as there were a few changes/bugfixes (you have to find and port).
Also it would be great if you could support more platforms (e.g. Windows Phone).
My proposed ReactivePropertyChangedBase implementation:
public class ReactivePropertyChangedBase : ReactiveObject, INotifyPropertyChangedEx {
#if !WinRT
[Browsable(false)]
#endif
public bool IsNotifying {
get { return areChangeNotificationsEnabled; }
set { throw new NotSupportedException(); }
}
public void Refresh() {
NotifyOfPropertyChange(string.Empty);
}
#if WinRT || NET45
public virtual void NotifyOfPropertyChange([CallerMemberName]string propertyName = "") {
#else
public virtual void NotifyOfPropertyChange(string propertyName) {
#endif
raisePropertyChanged(propertyName);
}
}
Caliburn.Micro 2.0.0 was released yesterday, and ReactiveUI 6 is rapidly approaching, so it would be great to have the latest versions of them included.
I couldn't find a license here on Github or on the NuGet site. I'd suggest the MIT license, but it's up to you.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.