Questions tagged [reactiveui]
ReactiveUI is a MVVM framework that integrates with the Reactive Extensions
848
questions
2
votes
1answer
2k views
How to bind button click commands in ReactiveUI for iOS
I'm trying to learn ReactiveUI for a Xamarin.iOS project and I'm stuck on what should be a simple task. I am unable to bind a button click to a ReactiveCommand in the same way I can in my companion ...
0
votes
1answer
854 views
ReactiveUI Advantages of putting WhenAnyValue in constructor
I have noticed that many of the examples of the ReactiveUI extension methods are placed in the constructor.
What are the advantages of this over placing in a "SetupObservables" method?
3
votes
2answers
2k views
How can I bind a command to a local event?
I have a form that should capture KeyDown/KeyUp events.
This code fails with NRE, because it looks for KeyDown control on my current view:
this.BindCommand(ViewModel, vm => vm.KeyDown, "KeyDown");...
1
vote
1answer
1k views
ObservableAsPropertyHelper - have to access Value to get it to subscribe?
I recently updated my ReactiveUI nugget packages to the latest pre-release versions (v5.99.4-beta). It has been a while since I did the update, but many of my tests on ViewModel's failed.
The ...
11
votes
1answer
3k views
ReactiveUI ObservableForProperty lifetime
I am curious about the life time of ObservableForProperty lifetime when not explicitly calling the Dispose on the Observer. I don't really care in this scenario about getting subscriptions for too ...
25
votes
1answer
5k views
What are the distinctions between the various WhenAny methods in Reactive UI
There are several extension methods in Reactive UI for getting observables for property changes.
I think I understand WhenAny and WhenAnyValue. WhenAny is for a series of property change ...
0
votes
1answer
177 views
Does WhenAny and friends always immediately 'OnNext' the current value of the properties?
Within a Reactive object constructor:
this.WhenAnyValue(x => x.SampleText, x => x)
.Subscribe((s) => { DoSomething(s); })
;
The DoSomething(s) seems to get triggered ...
0
votes
2answers
667 views
Can't listen to ItemChanged, ItemsAdded or ItemsRemoved on ReactiveList<T>
I have a ReactiveObject with a Property "A" of type "ReactiveList".
In my ViewModel I'd like to sum a property of "T" of every item in my list.
I got it working, while "A" not changes its value.
But ...
3
votes
1answer
449 views
ReactiveUI + Portable Class Library?
I'm porting a WPF app over to Windows Store app. I have some view models that I would like to put into a Portable Class Library. That code uses reactiveui framework. I created the library and I use ...
3
votes
2answers
4k views
How do I merge several observables using WhenAny(…) in ReactiveUI?
I have a question which is an extension of the following question raised on this site.
Is there a more elegant way to merge observables when return type is unimportant?
I have an IObservable<Unit&...
5
votes
1answer
946 views
Structuring tests (or property) for this reactive ui scenario
I'm not sure the correct way to structure this test. I've got a view model here:
public class ViewModel
{
public ReactiveCommand PerformSearchCommand { get; private set; }
private readonly ...
0
votes
2answers
424 views
ReactiveUI Command with WCF resulting in Thread error on updating of Observable Property
I am attempting to make a WCF call using ReactiveUI commands and capturing the resulting string with ObservableAsPropertyHelper. With the code below I am receiving the following error message -
"The ...
0
votes
1answer
280 views
Trouble Zipping ReactiveList<T>.ItemChanging with ReactiveList<T>.ItemChanged
I am trying to zip two sequences from a ReactiveList to return the old and new values when something changes. The zipped subscription however appears to be returning the same value for 'old and new'.
...
0
votes
2answers
235 views
Where to find this ReactiveUI.Routing?
I got a sample code that I couldn't get to compile. It is complaining about a missing Reference to ReactiveUI.Routing.dll
The piece of code that is using it is some Xaml code using RoutedViewHost ...
2
votes
1answer
363 views
ReactiveUI, get a list from a viewmodel when navigated to - if the viewmodel implements interface
I'm using ReactiveUI and its Router.
Some of my IRoutableViewModels implements a interface IHaveCommands, which have a property IEnumerable<IReactiveCommand> Commands { get; }
So, what I want, ...
3
votes
1answer
880 views
ReactiveUI/Reactive Extensions: how to clear ObservableAsPropertyHelper
I am using the ReactiveUI framework to do searching for a list of airports in the world.
I have setup the ObservableAsPropertyHelper that is the output of the suggested airports from a SearchTerm ...
7
votes
2answers
3k views
ReactiveUI How to use WhenAnyObservable properly
I am attempting to use WhenAnyObservable for the first time.
When a ReactiveList Count == 0 and a tipText length is > 0 then I want to set a local value to true in the subscribe, or the opposite.
...
4
votes
2answers
435 views
Focus on control using ReactiveUI?
In WPF, I started using ReactiveUI a short space of time is a question that came to me, it would be possible to put the focus on a specific control through my MainViewModel, it would be possible also ...
1
vote
1answer
2k views
What is the best way to use an asynchronous API with ReactiveUI to populate a collection?
Let us say I have this ReactiveUI view model structure, with Model being some arbitrary model type.
class ViewModel : ReactiveObject
{
private readonly ReactiveList<Model> _models;
...
8
votes
1answer
4k views
ReactiveUI - Confused about Routing
I'm in the process of comparing MvvmCross with ReactiveUI for a major pharma project on Win Store, WP8, iOS, Droid. We've already selected Xamarin.
I'm totally new to ReactiveUI. I really like what I ...
0
votes
1answer
228 views
xaml converter error in reactiveui
I get the following mysterious error when trying to use ReactiveUI's MVVM framework in a Windows Store app:
Error: Converter failed to convert value of type 'ReactiveUI.RoutingState, ReactiveUI,
...
1
vote
2answers
986 views
ObserveOn vs modifying code to run on main thread
I have a viewmodel that triggers various objects' observables on a thread separate from the UI thread. At the same time, there's view code that is subscribing to these observables, which needs to ...
1
vote
2answers
671 views
Incorrect thread accesses UI object when using Caliburn.Micro.ReactiveUI 1.2.2
I'm trying to write a very simple sample using Caliburn.Micro.ReactiveUI this sample combines the Basic Configuration, Actions and Conventions sample from the Caliburn.Micro Documentation with the ...
0
votes
2answers
1k views
Communicating between view and view model using ReactiveUI.NET
I am fairly new to reactive UI. I am using it in my app extensively for async programming etc.
I have a question. I have a method in my ViewModel which is async and which "awaits" for a task to ...
0
votes
1answer
806 views
Does ReactiveUI RaiseAndSetIfChanged fire for List<T> Add, Delete, Modify?
Will this fire
private List<TweetTileViewModel> _TweetTiles;
public List<TweetTileViewModel> TweetTiles
{
get { return _TweetTiles; }
set { this....
0
votes
1answer
164 views
Where do I find ReactiveCollections in ReactiveUI 5.3
I have added ReactiveUI v5.3 to a Visual Studio console app and cannot find ReactiveCollections in the assembly. What am I missing?
4
votes
1answer
2k views
ReactiveList and WhenAny
I have a number of check lists held in ReactiveLists that have ChangeTrackingEnabled = true. I want to only enable my OkCommand when there is at least one item checked in each list.
In addition there ...
1
vote
2answers
781 views
Buffer data from database cursor while keeping UI responsive
I have a database catalog that is populated, and a cursor that can be used to retrieve objects. This catalog can obviously be very large, and what I'd like to do is use ReactiveUI to buffer the data ...
1
vote
1answer
156 views
ReactiveUI WhenAny fails to fire when compiled in VS 2010
I'm using Reactive UI with a simple example.
I want a button's command to be enabled when a user types the correct phrase into a text box. I've set up the view model as follows:
public class ...
3
votes
2answers
1k views
Why does ReactiveUI's ToProperty on an ObservableForProperty cause a FailInit in F#
In ReactiveUI 5.2.0 and F# 3.1, the following F# code causes an InvalidOperationException when constructing the object (from a C# WPF app)
The message is "The initialization of an object or value ...
1
vote
3answers
1k views
Process lots of small tasks and keep the UI responsive
I have a WPF application that needs to do some processing of many small tasks.
These small tasks are all generated at the same time and added to the Dispatcher Queue with a priority of Normal. At the ...
0
votes
3answers
2k views
WPF TextBox Search
I have a quickFind TextBox. I want to filter a collection for records that contain the quickFind string.
How can I delay the search until the user has stopped typing for 2 seconds?
1
vote
1answer
2k views
Is there a way to specify initial values to reactive extensions observables?
In reactiveui and reactive extensions you can combine multiple observables into one. Using functions like CombineLatest or Zip you can make the resulting observable use a function to compute result ...
0
votes
1answer
977 views
Testing ReactiveCommand async result
I use Xamarin and ReactiveUI to do mobile apps.
I'd like to test my ViewModel and its ReactiveCommand.
I register an asynchronous operation which return an IObservable inside the ReactiveCommand.
...
0
votes
1answer
107 views
Specific error messages using ReactiveUI's ReactiveValidatedObject?
Say I have an Email property and i want to show 2 different specific error messages like "required" or "invalid format" accordingly to provide a better user experience... how do I do that?
4
votes
2answers
1k views
Resharper Create Custom Refactor for ReactiveUI's ReactiveObject
So I have a ton of viewmodels and models in my code that require each property to use the ReactiveUI way of observing their changes:
private bool _myProperty;
public Boolean MyProperty
{
get { ...
4
votes
2answers
3k views
UICollectionView - too many update animations on one view
Update: Solved! See my answer below for the solution.
My app displays a number of images in a UICollectionView. And I'm currently experiencing a problem with insertItemsAtIndexPaths when new items ...
0
votes
1answer
695 views
ReactiveUI RaiseAndSetIfChanged() Backing Field Accesibility
Problem: Cannot set backing field of property to private as I get the following exception when setting a value to Name.
System.ArgumentException : You must declare a
backing field for this property ...
2
votes
2answers
1k views
Validation on ReactiveUi 5
I was using the ReactiveUI 5, but now i need to do Validation in my ViewModel, so I used the ReactiveValidatedObject as described in documentations. The configuration was made as tha same in the ...
1
vote
1answer
1k views
Multiple bindings from ReactiveUI search using ObservableAsPropertyHelper<>
I have a working implementation of a ReactiveUI asynchronous search routine within an WPF MVVM application based off of the following (legacy) example:
http://blog.paulbetts.org/index.php/2010/07/05/...
2
votes
3answers
999 views
Writing my own IScheduler to to manage threads, what should be the best way to do this?
I am using ReactiveUI's ReactiveCommand feature which is very cool and serves the purpose. The only issue I am having with that is, ReactiveCommand when instantiated needs an IScheduler implementation ...
3
votes
2answers
167 views
Observing changes only within a window that commits successfully
Suppose I have the following class:
public class Person : ReactiveObject, IEditableObject
{
private string name;
private string nameCopy;
public string Name
{
get { return ...
0
votes
1answer
188 views
ReactiveUI: window size when routing in WPF
In my WPF application I have two UserControls with different sizes (Height and Width) and I'm using the routing scheme from ReactiveUI to navigate between this two Views.
My problem is that the ...
0
votes
1answer
607 views
What Am I Missing About Reactive Extension Timers?
I have this:
watchers
.ToObservable() // needs to be observable
.SelectMany(watcher => // working on each watcher
Observable
// create a timer for the watcher
.Timer(...
4
votes
1answer
4k views
Reactive Extensions / Reactive UI Observe collection, group it, and display it
I have a specific data set that requires storing data that is both grouped and ordered. Each row then needs to be able to recalculate it's sums whenever any individual item changes.
This is the ...
0
votes
1answer
210 views
Invalid cross-thread access using ReactiveUI RouterViewHost
I am trying to learn ReactiveUI, and am currently trying to set up the Routing feature. I have been "following" the Play rxui-5-update branch on github:
https://github.com/play/play-windows/tree/...
1
vote
2answers
562 views
ReactiveUI and casting in WhenAny
What I am doing is this:
Item.PropertyChanged += (sender, args) =>
{
if(sender is IInterface)
DoSomethingWith(((IInterface)sender).PropertyFromInterface);
}
how would I go about ...
3
votes
1answer
356 views
ReactiveUI 5.1 stackoverflowexception when doing anything with ReactiveObject
According to this question, using ReactiveUI and CM should be a walk in the park: ReactiveUI and Caliburn Micro together?
however I am having difficulties at the baby steps already.
I am going with ...
5
votes
2answers
1k views
is there a way to subscribe to all hierachical property changes with Reactive UI?
Referring to question: (Is there a pattern for subscribing to hierarchical property changes with Reactive UI?)
I currently have a child reactiveobject in my parent reactiveobject.
public class Child ...
2
votes
1answer
441 views
Cancelling / Ignoring result of ReactiveAsyncCommand in ReactiveUI
I have a ReactiveAsyncCommand to perform a search as a user is typing into a textbox, which is setup like this:
var results = SearchCommand.RegisterAsyncFunction(term =>
PerformSearch((string)...