views:

334

answers:

0

I am currently working on a way to create my own WPF control for displaying items in a page-like fashion (like the Google results pages view for example). One Item in the controls children collection should be selected and x bordering children should be shown. The other children (excluding first and last item) should be hidden like this:

1 ... 15 16 _17_ 18 19 ... 35

I am now wondering if it would be easier to implement this by deriving my custom control from selector and provide a DataTemplate for it (like ListBox) or derive from Panel and just provide Measure/Arrange methods (like StackPanel).

EDIT: I have implemented a prototype version via deriving from the Panel class. However one problem that arises is that I don't really know how I should show the "..." between the shown elements in a custom Panel class. Can this be realised with a custom Panel?

Do you have any advice? How would you go about solving this problem? Is there a already built control that fulfills my requirements?