Some useful stuff for better Mvvm in WPF
XCommand
(To bind between Events, Commands, Methods and Property for CanExecute) with smart refresh of the CanExecute (Have some code evaluation features similar to Eval).Eval
Binding with Code Evaluation (Avalonia UI Style and more)- On DataContext (Properties and methods directly available)
- ElementName
#Name.Something
- RelativeSource
$self
,$parent
(LogicalTree),$$parent
(VisualTree),$parent[TypeName]
,$parent[3]
,$parent[TypeName,2]
- StaticResource
@ResourceKey
XMultiBinding
for nestingMultiBinding
,Binding
,Eval
and other markups. You can use at each levelIMultiValueConverter
,IValueConveter
(Work very well with CodingSeb.Converters)IRelayCommand
(That inherit from ICommand) to call RaiseCanExecuteChanged() from anywhereRelayCommand
RelayCommand<T>
- Some extensions methods to navigate in both VisualTree and LogicalTree easily from C#
NotifyPropertyChangedBaseClass
the class to inherit that implementingINotifyPropertyChanged
and apublic virtual void NotifyPropertyChanged([CallerMemberName] string propertyName = "")
Code Evaluation stuff use CodingSeb.ExpressionEvaluator
You can also use PropertyChanged.Fody and/or ReactiveUI.Fody to simplify more your Mvvm code