An advanced, composable, functional reactive model-view-viewmodel framework for all .NET platforms that is inspired by functional reactive programming. ReactiveUI allows you to abstract mutable state away from your user interfaces, express the idea around a feature in one readable place and improve the testability of your application.
Added Wpf Bind which uses ReactiveUI ReactiveProperty with validation as a validation source
What might this PR break?
New Feature
Please check if the PR fulfills these requirements
[ ] Tests for the changes have been added (for bug fixes / features)
[ ] Docs have been added / updated (for bug fixes / features)
Other information:
Example
public partial class MainWindow : ReactiveWindow<MainWindowViewModel>
{
public MainWindow()
{
InitializeComponent();
ViewModel = new MainWindowViewModel();
this.WhenActivated(cleanup =>
{
this.BindWithValidation(
ViewModel,
vm => vm.NoSymbolsTextProperty.Value,
view => view.NoSymbolsEntry.Text,
.DisposeWith(cleanup);
});
}
}
using System.ComponentModel.DataAnnotations;
using ReactiveUI;
public class MainWindowViewModel : ReactiveObject
{
[RegularExpression(@"^[^!@#$%^&*()]*$", ErrorMessage = "Symbols not allowed!")]
public ReactiveProperty<string> NoSymbolsTextProperty { get; }
public MainWindowViewModel()
{
NoSymbolsTextProperty = new ReactiveProperty<string>().AddValidation(() => NoSymbolsTextProperty);
}
}
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
What kind of change does this PR introduce?
feature
What is the current behavior?
No code bindings exist supporting Validation
What is the new behavior?
Added Wpf Bind which uses ReactiveUI ReactiveProperty with validation as a validation source
What might this PR break?
New Feature
Please check if the PR fulfills these requirements
Other information: Example