3

I have to create a schedule control using WPF XAML for displaying items with duration as little as 1 seconds and potentially as large as couple of hours.

First thing which seems clear is that I will need some kind of zoom capability, for drilling into the items with very short durations and zooming out to view the items with very large durations.

I have a UI style in mind where by when the control is zoomed to view the large items, any small duration items which generally occur between the large duration items are some how collected in to a 'bucket' which has a height >= a minimum display height. So that I can perhaps hover a mouse over this bucket and get a tool tip which renders the contained items into a time ordered list view.

I am at a loss as to where to begin. I feel that I could perhaps achieve something in the Measure/Arrange overrides of a custom Panel. But I think this could adversely affect render performance. If I were to do it this way, I guess I would need to inject a 'bucket' view into the panels children collection, but that would break the use of ItemTemplate in my Custom Items Control?

My second though is that I create a custom observable collection which has a bindable Scale property which then organises the collection into 'buckets' of a duration large enough to be displayable.

Does anyone have any thoughts on how I should best approach this problem?

  • If you edit it to take out the technical details about xaml and present this as a question of how to implement the functionality you describe with a nice user experience, I think this would make a spectacular question for UX.SE. It fits here fine, but not a lot around P.SE tend to have a strong UX specialization. Have you tried having no bucket but a list below your zoomable control that just lists "undisplayed schedules", or maybe even all schedules where clicking on one would zoom to it. Just a thought, but I am far from a UX guy – Jimmy Hoffa Mar 10 '14 at 17:41
2

I've created a scheduling control in WPF and you're right about using the Measure/Arrange overrides of a panel for part of your work.

There's a great series of blog posts where the author goes over the making of just the same thing.

For zooming, I created a ZoomCommand that could be bound to any gesture to allow a user to zoom in and out. (Works great with WPF's support for pinch to zoom). I think walking through this series should give you a great place to start.

  • Sorry I took so long to reply! – Michael Brown Apr 1 '14 at 21:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.