I have a horizontal Listbox bound to an enum including a EnumToImageSource Converter working and need the Listbox/view to get a selectedItem.
I need the images in the Listbox to scale down their width to be all visible side by side without a horizontal scrollbar appearing even when resizing the window.
The Solutions in this question only work for normal vertical Listviews. Can this even be done what i'm trying to archive?
<ListBox HorizontalContentAlignment="Stretch"
ScrollViewer.HorizontalScrollBarVisibility="Hidden"
ItemsSource="{Binding Source={StaticResource shoeValuesProvider}}">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal"/>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemTemplate>
<DataTemplate>
<Image Source="{Binding Converter={StaticResource ShoeToImageConverter}}"/>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>