I am trying to create a list of items where items can be expanded over other items on hover/click/some other event.
Currently I am using a WrapPanel and I'm binding Items to ItemsControl's ItemsSource property. Items look good and WrapPanel works well when its size changes, but I cannot think of a way in which an item will be able to expand outside of its original bounds, over other items in the WrapPanel.
Maybe an image will make it clearer.
This is what items look like:
And this is what I want to achieve on item hover/click:
Of course the item needs to go back to its original size when mouse leaves it.
This is the code I'm using:
LIST:
<ScrollViewer VerticalScrollBarVisibility="Auto">
<ItemsControl ItemsSource="{Binding Items}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<local:WorkoutsListItem/>
</DataTemplate>
</ItemsControl.ItemTemplate>
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
</ItemsControl>
</ScrollViewer>
ITEM:
<Border Style="{StaticResource WorkoutsButton}" Height="150" Width="250">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="60"/>
</Grid.RowDefinitions>
<Image Grid.Row="0" Height="70" Width="70"/>
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0" Orientation="Horizontal">
<TextBlock [...]/>
<TextBlock [...]/>
</StackPanel>
<TextBlock Grid.Column="1" [...]/>
<StackPanel Grid.Column="2" Orientation="Horizontal">
<TextBlock [...]/>
<TextBlock [...]"/>
</StackPanel>
</Grid>
</Grid>
</Border>
Thanks for help!