私は、ユーザーが使用する画像を選択できる、IsolatedStorage からの画像を含む ListBox です。リストボックス内で、画像の周囲の境界線を介して(または別の方法で)、現在選択または押されている画像をユーザーに表示したいと思います。現在選択されている画像を取得し、その画像の周りに境界線を配置する方法が正確にはわかりません。現在、ListBox の SelectionChanged イベントを使用して、この機能を試しています。私がこれまでに持っているものは次のとおりです。
MainPage.xaml
<ListBox x:Name="Recent" ItemsSource="{Binding Pictures}" Margin="8"
SelectionChanged="recent_SelectionChanged" toolkit:TiltEffect.IsTiltEnabled="True">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<toolkit:WrapPanel Orientation="Horizontal" />
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemTemplate>
<DataTemplate>
<Image x:Name="recentImage" Source="{Binding Source}" Margin="12" Width="115"/>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
MainPage.xaml.cs
private void recent_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
//Place border round currently selected image
//?
}
何かご意見は?