タイル データ テンプレートを使用してリストボックスを作成しました。私が今理解しようとしているのは、マウスオーバーまたは選択されたイベントが発生したときに各リストボックス項目にスケール効果を適切に適用し、ラップパネル内で適切にレンダリングする方法です. 現在、ListBoxItemTemplate の表示状態にアニメーションを追加しています。
いくつかの考慮事項: アニメーションが呼び出されると、ラップ パネル内のタイルが再配置されず、スケーリングされたアイテムが適切に表示されるようになります。ラップ パネル内のアイテムを再配置して、スケーリングされたアイテムが表示されるようにしたいと考えています。
また、拡大縮小したアイテムがラップ パネルの境界を超えていることに気付きました。拡大縮小したアイテムをラップ パネルの表示可能領域に制限する方法はありますか?
検索ビューで使用されるコード
<Grid x:Name="LayoutRoot">
<ListBox x:Name="ResultListBox"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Background="{x:Null}"
BorderThickness="0"
HorizontalContentAlignment="Stretch"
ItemContainerStyle="{StaticResource TileListBoxItemStyle}"
ItemsPanel="{StaticResource ResultsItemsControlPanelTemplate}"
ItemsSource="{Binding SearchResults[0].Results}"
ScrollViewer.HorizontalScrollBarVisibility="Disabled">
<ListBox.ItemTemplate>
<DataTemplate>
<formatter:TypeTemplateSelector Content="{Binding}" HorizontalContentAlignment="Stretch" Margin="2.5">
<!-- Person Template -->
<formatter:TypeTemplateSelector.PersonTemplate>
<DataTemplate>
<qr:ucTilePerson />
</DataTemplate>
</formatter:TypeTemplateSelector.PersonTemplate>
<!-- Incident Template -->
<formatter:TypeTemplateSelector.IncidentTemplate>
<DataTemplate>
<qr:ucTileIncident />
</DataTemplate>
</formatter:TypeTemplateSelector.IncidentTemplate>
</formatter:TypeTemplateSelector>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Grid>
ResultsItemsControlPanelTemplate は app.xaml で次のように定義されています。
<ItemsPanelTemplate x:Key="ResultsItemsControlPanelTemplate">
<toolkit:WrapPanel x:Name="wrapTile"/>
</ItemsPanelTemplate>
どこを見るべきかについての提案をいただければ幸いです 事前に感謝します
現在の結果のイメージ