ReactiveUI | functional reactive model-view-viewmodel framework | Reactive Programming library
kandi X-RAY | ReactiveUI Summary
kandi X-RAY | ReactiveUI Summary
ReactiveUI is a composable, cross-platform model-view-viewmodel framework for all .NET platforms that is inspired by functional reactive programming, which is a paradigm that allows you to abstract mutable state away from your user interfaces and express the idea around a feature in one readable place and improve the testability of your application.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of ReactiveUI
ReactiveUI Key Features
ReactiveUI Examples and Code Snippets
Community Discussions
Trending Discussions on ReactiveUI
QUESTION
Program.cs(18, 44): [CS1061] 'AppBuilder' does not contain a definition for 'UsePlatformDetect' and no accessible extension method 'UsePlatformDetect' accepting a first argument of type 'AppBuilder' could be found (are you missing a using directive or an assembly reference?)
...ANSWER
Answered 2022-Mar-25 at 11:09The UsePlatformDetect
extension has its definition in the Avalonia.Desktop
assembly, so you have to add a reference to it in your .csproj
QUESTION
I am having really weird issues with memory leak and I cannot find source after long hours of testing, debugging and trial/error attempts.
The source of memory leak is reloading object base on push from subject. On which part I load current database values and add it to SourceCache.
This part is getting the push, to initiate reload
...ANSWER
Answered 2022-Feb-09 at 20:56The bug was reported and fixed here in library repository: https://github.com/reactiveui/ReactiveUI/issues/3091
QUESTION
I want to use Dynamic Data as WPF's CompositeCollection alternative in an AvaloniaUI project.
Here is some code to expose the issue :
...ANSWER
Answered 2022-Jan-26 at 17:15I can't really do it only with DynamicData, so I came with this solution. Not really elegant but it works...
I created an ObservableCollectionAggregate class. I can Assign and Unassign the different (typed) ObservableCollections.
QUESTION
I am building a simple DateTime calculator using a ReactiveUI ReactiveObject viewmodel.
It has a calculate command that calculates a value and correctly updates the result backed by an ObservableAsPropertyHelper field.
I also have a ReactiveUICommand that is supposed to reset all of the UI values.
The problem that I am running into is how to reset the readonly "Result" value.
...ANSWER
Answered 2022-Jan-17 at 19:57Figured this out myself:
QUESTION
I have a view model which has a property A. Property A is of a type which has a property B. Now I want to subscribe in my view model's constructor to any direct change of property B. By "direct" I mean that I want to run my subscription only if property B of the current value of property A is changing but not if the value of property A is changed.
By now I have something like this:
...ANSWER
Answered 2021-Dec-08 at 19:25You can use ObservableForProperty()
to build an IObservable
for the properties you have, which will not fire the initial value they have. This in combination with Switch()
allows you to build an IObservable
for the property B
, which will only fire changes to the property B
, but not when the property A
is changed. The code might look like this:
QUESTION
I want to implement styling for TabControl in my browser like in chrome. The number of tabs is not fixed, so I want the tab headers to decrease depending on the number of tabs.
To do this, I bind the width of the Grid in the DataTemplate to the count of tabs, which is passed to the converter, which returns the actual width.
But for some reason this does not work, I know that the TabItemCount is accurately passed to the converter. If the converter returns a fixed value, then nothing prevents the tabs from resizing
Style:
...ANSWER
Answered 2021-Nov-29 at 16:18I think you could just use UniformGrid
as a panel template, so you get all those calculations for free
QUESTION
I have an object with two WhenAnyValues
:
ANSWER
Answered 2021-Nov-27 at 11:27The issue is not the WhenAnyValue()
call, it can be used multiple times on the same property and each of them will fire the observed value change separately. The issue is the ToPropertyEx()
call or the underlying ToProperty()
call it redirects to.
The point of ToProperty()
or ToPropertyEx()
is to build a value subscription for a specific target property (here SomeString
). It will configure the subscription and fire a PropertyChanged
event on value changes. The getter you have for your SomeString
property will be linked to one generated ObservableAsPropertyHelper
instance, either with explicit code like
QUESTION
I was following this tutorial, which I do see is based on the .net core 2.1 framework
, but adapted for the .net 5 avalonia.mvvm
template. I followed the code line for line with the exception of the Program.cs
file given the fact that the avalonia.mvvm template in .net 5 implements the ViewLocator.cs
class so I don't believe I have to use Locator
. Yet, when I run the app while the Router.NavigationStack.Count
increments, the view remains on its default content. Here is the code
ANSWER
Answered 2021-Nov-26 at 19:03Apparently the answer was just that the ViewLocator.cs
class of the current avalonia.mvvm template has nothing to do with the IViewLocator
that RoutedViewHost
from ReactiveUI
needs in order to work. Just needed to add this line to Program.cs
QUESTION
I want to make a Start / Welcome / Solution selection window which has similar functionalities to the one used in VS19 / VS22, but I'm not sure how to do it exactly.
For more context, my current StartWindowView has a "Create New Project..." button, which should replace the entire window content with a 2-page project creation wizard.
Page 1 should be "Basic Options" where on the bottom there are "Cancel" and "Next" buttons ("Cancel" goes back to the original StartView and "Next" goes to Page2View).
Page 2 should be "Extra Options" where on the bottom there are "Back" and "Finish" buttons ("Back" goes back to Page1View and "Finish" goes back to the StartView, returning a ProjectModel)
From my understanding, these are the ViewModels I'd have to deal with:
...ANSWER
Answered 2021-Nov-22 at 16:51It's not terribly difficult, just keep an observable collection of your view model stack, and always display the last one (or the first one, it's easier with WPF bindings). Note that I'll be referring to this as a stack, but there is no ObservableStack<>
already built for you. Either use an ObservableCollection<>
or build your own observable stack.
Then as you need to navigate "into" your wizard (new project, clone a repository, etc), you simply push the new child view model onto the stack. When you need to navigate "out of" your wizard (ie, on Cancel), pop the last view model from the stack.
The last step is to associate your views to view models (using DataTemplate
in a high-level resource block, either a global one or a local one in your start page) and then bind your view model stack's top to your main window (the shell that has a ContentControl
bound to the top of your stack).
QUESTION
I'm trying to test some error responses (BadRequest, Unauthorized, ...) with Refit and so I implemented a TestHandler that returns any desired response. The response works fine with an "OK" (HTTP status code 200) response:
...ANSWER
Answered 2021-Nov-22 at 15:07Found it, with help from a colleague! Turns out the HttpResponseMessage
needs some/any RequestMessage
.
Change
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install ReactiveUI
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page