FishEye selected image index or something
Frage
I am quite new to WPF.I came accross this wonderful project. I have planed to use it. I have used it to show the fish eye effect how ever I want that if it is possible to see which image is selected and if it gets clicked i get to know which index or something so that i can do some logic.
Possible?
Lösung
The article describes the creation of a custom panel. A panel in WPF describes layout but does not support selection. In order to support selection you need to use a control such as ListBox. Fortunately the ListBox allows you to specify which panel to use to fost your content:
<ListBox>
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<!-- the custom fish eye panel -->
<FishEyePanel/>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
</ListBox>
Whether this works or not depends on the implementation of the fish-eye panel. However, this is the right direction to move in!
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow