I am working on a control for one of our applications. The control shows the current focused day as a support, and the X axis shows the time of day. The Y axis does not have a scale as such; it will highlight the elements to display. The overall appearance of the control will be very similar to the gantt chart showing the time of day of various tasks. For a (very rough) idea, see The Art of ascii (not) below.
8 9 10 11 12 1 2 3 4 5 6
-----------------------------------------------------------------------------
| | | | | | | | | | |
| ====================== | | | | | |
| | | ====================== | | | |
| | | | | | | ======== | |
| | | | ===========================================
| | | | | | | | | | |
I have a background grid designed to resize and have a “current time” indicator implemented as a vertical blue line to show where we are in relation to the tasks. When the control changes, the current position of the time indicator is recalculated to make sure its correct time.
Now I'm not sure how to implement horizontal columns that represent the elements of a task. I have a task object with a start time, end time, name and description, and I would like the control to contain a collection of these objects. I would also like these objects to display a display.
WPF , . , - , . (, StackPabnel, )
<UserControl declarations here... >
<UserControl.Resources>
<ObjectDataProvider x:Key="myCollection" />
</UserControl.Resources>
<Grid Name="myBackgroundGrid" Margin="0,0,0,0" ... >stuff goes here to draw the background</Grid>
<StackPanel ItemsSource="{Binding Source={StaticResource myCollection}}" />
</UserControl>
- , , , , () , , .
.
- EDIT--
"", , - , . , .