I could use some suggestions in order to show each object in a list, in different places in a wpf view.
Lets say I have made a view and splitted it up in rows and columns like this:
<Grid.RowDefinitions>
<RowDefinition Height="0.7*" />
<RowDefinition Height="1*" />
<RowDefinition Height="1*" />
<RowDefinition Height="1*" />
<RowDefinition Height="1*" />
<RowDefinition Height="1*" />
<RowDefinition Height="1*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"></ColumnDefinition>
<ColumnDefinition Width="1*"></ColumnDefinition>
<ColumnDefinition Width="1*"></ColumnDefinition>
<ColumnDefinition Width="1*"></ColumnDefinition>
<ColumnDefinition Width="1*"></ColumnDefinition>
<ColumnDefinition Width="0.3*"></ColumnDefinition>
</Grid.ColumnDefinitions>
Then I have created stack planels for each of these boxes where I want to show information of a certain room (Hotel room)
<StackPanel Grid.Row="1" Grid.Column="1" Margin="5">
<TextBlock FontFamily="../Fonts/bold.ttf#bold">Room 101</TextBlock>
</StackPanel>
<StackPanel Grid.Row="1" Grid.Column="2" Margin="5">
<TextBlock FontFamily="../Fonts/bold.ttf#bold">Room 102</TextBlock>
</StackPanel>
I'm using MVVM, and have a RoomsViewModel that have a list like this:
public ObservableCollection<AvailableRoomModel> AvailableRooms { get; private set; }
Basically a list of AvailableRoomModel objects. I know I can use a listView to show the data or a ListBox, but want to make a nice overview of all rooms in a hotel and if they are available at the moment.
The first Box with room 101, should be binded to the first object in the list and so on?
Do some of you know what to use so I can show all rooms in hotel? Idea is to mark each room with a color or something if the room is available at the given time.
Good day ;)