You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 1, 2024. It is now read-only.
As you can see, by default, row foreground is Blue. When Id is changed, row foreground must be changed to Red or Green.
First of all, it's not compilled with error Unable to resolve property or method of name 'IsEven' on type 'AvaloniaApplication1.MyViewModelList'. Second, if I use cast in binding like this Binding="{Binding (vm:MyViewModel).IsEven}", it compiles successfuly, but color doesnt't canges.
Same for DataGridCell style.
Is it bug or I do somthing wrong?
The text was updated successfully, but these errors were encountered:
Hi, @maxkatz6 . Sorry to bother you but I have the same issue . And I found it affects all ItemsControl.
For example, add a behavior to Avalonia.Xaml.Behaviors\samples\BehaviorsTestApplication\Views\Pages\EditableListBoxView.axaml (See full code bellow). It will show an error Avalonia error AVLN:0004: Unable to resolve property or method of name 'Name' on type 'BehaviorsTestApplication.ViewModels.MainWindowViewModel'..
It indicates the datacontext of the Binding in the DataTriggerBehavior is the datacontext of MainWindow(MainWindowViewModel), not the datacontext of the ListBoxItem(ItemViewModel). There should be something wrong. You mentioned x:DataType but I don't know how to use it in this situation. Could you add more details?
I have a minimal test case, where I can't make
DataTriggerBehavior
make to work withDataGridRow
style.I have simple view models:
and a simple view for it:
As you can see, by default, row foreground is
Blue
. WhenId
is changed, row foreground must be changed toRed
orGreen
.First of all, it's not compilled with error
Unable to resolve property or method of name 'IsEven' on type 'AvaloniaApplication1.MyViewModelList'
. Second, if I use cast in binding like thisBinding="{Binding (vm:MyViewModel).IsEven}"
, it compiles successfuly, but color doesnt't canges.Same for
DataGridCell
style.Is it bug or I do somthing wrong?
The text was updated successfully, but these errors were encountered: