Relative Content

Tag Archive for c#xamlmaui

OnPropertyChanged in all object’s properties

Im working with MVVM, i have a ClientClass object with many properties (~50). So, in my view i have a Picker that is binded to the Client.ClientType property, and the same property binded to an Image icon like, that change depending on the Client.ClientType value. The problem is if i change that value, the OnPropertyChanged is not triggering, it only does if Client is assigned a whole new value like Client = new ClientClass().
I know i can wrap the property and force it like this:

How to have different layout in collection view depends on platform MAUI

<CollectionView> <– this should be for android–> <CollectionView.ItemsLayout> <GridItemsLayout/> </CollectionView.ItemsLayout> <– this should be for ios–> <CollectionView.ItemsLayout> <LinearItemsLayout/> </CollectionView.ItemsLayout> <CollectionView.ItemTemplate> <DataTemplate> <Label/> </DataTemplate> </CollectionView.ItemTemplate> </CollectionView> I want to have that layout without using the “#” to separate the android or ios is there something like OnPlatform. c# xaml maui