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
Hi Ishrak,
I see it's fairly old code, but I found it relly helpful.
Some suggestions:
you might want to remove unused using statements
in HotelsGroupViewModel, you have a property and a backing variable (items and Items).
In the constructor (lines 30-31) you initialise them both, one would be enough.
HotelViewModel is derived from ObservableRangeCollection
This is a big no-no in programming in general, however, in this case it is a key part of the implementation, you might want to add a comment about it: ListView requires a collection of a collection of items (List<List>). The only way you can achieve this if HotelViewModel IS a collection of RoomViewModels, it can't be implemented as a type with a property holding the collection of those.
The text was updated successfully, but these errors were encountered:
Hi Ishrak,
I see it's fairly old code, but I found it relly helpful.
Some suggestions:
In the constructor (lines 30-31) you initialise them both, one would be enough.
This is a big no-no in programming in general, however, in this case it is a key part of the implementation, you might want to add a comment about it: ListView requires a collection of a collection of items (List<List>). The only way you can achieve this if HotelViewModel IS a collection of RoomViewModels, it can't be implemented as a type with a property holding the collection of those.
The text was updated successfully, but these errors were encountered: