I have an application with minimizable controls. Minimized items are displayed in a horizontal stackpanel. On resize (shrink) of the application items could be chopped because of too little space.
To avoid this my idea was to move chopped elements to an expandable control (like this)
The application follows the MVVM pattern, the items in the panel are in an ItemsControl bound to the view model.
My implementation for now is to use a custom panel where the chopped elements are handed out with a property "SpillOverElements". I wanted to bind another control (panel, expander or popup) to this property. The problem is that I am not able to bind to the "SpillOverElements" property of the "SpillOverPanel" inside the ItemsControl.
<ItemsControl>
ItemTemplate="{StaticResource DummyContentDataTemplate}"
ItemsSource="{Binding DisplayElementsCollection}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<local:SpillOverPanel />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
</ItemsControl>
So the question is how could I bind to "SpillOverElements" property of the "SpillOverPanel". Any other ideas how to implement this are welcome, too. I am not sure if my way is the right approach.
Thanks in advance for your help!