using TimelineLibrary for WPF

Nov 4, 2009 at 12:10 AM

Can we use TimelineLibrary for WPF Window/Timeline Control? 

 

Thanks,

Kola

Coordinator
Nov 4, 2009 at 1:31 AM

not without some minor work. right now it is silverlight control, but should be easy to port it to wpf.

 

Nov 4, 2009 at 2:20 AM

Is it easy to customize for WPF myself. can you plz help me what are the areas I have to look into.

 

Thanks,

Kola

Coordinator
Nov 4, 2009 at 2:30 AM

Silverlight is scaled down WPF, so I guess you should create blank WPF application and link files from TimelineLibrary into it, but probably some other minor changes are required. I will try tomorrow and let you know.

 

Nov 4, 2009 at 7:06 PM

OK. Here my source of data is Entity (ArrayList/Collection). Can I create 3 main timeline band's based on categories, controled(zoomable) by one timeline band.

 

Thanks,

Kola

Coordinator
Nov 4, 2009 at 7:19 PM
Edited Nov 4, 2009 at 7:20 PM

You may have not more than 7 timeline bands: Decades, Years, Months, Days, Hours, Minutes10, Minutes (though I do not see the case when you need them all at once). There is no such thing like category of event, but you may use different color of events for your different categories.

Coordinator
Nov 4, 2009 at 7:34 PM

Also, you can have only one main band. Main means that different xaml style of event is used. There are actually 2 xaml styles for events (each can be customizable by you): first is for main band (by default it has duration line, image, title, teaser, more link and tooltip) and second (for all the other bands, which has just duration line and tooltip). You can override both of them, but you cannot have more than 2. Also there may (and should) be only one main timeline band and from 0 to 6 secondary timeline bands.

Nov 4, 2009 at 9:20 PM
Edited Nov 4, 2009 at 9:21 PM

what  I mean category is grouping events by there category, time band will be same for all. Arranging all the events based category (like sports, entertainment, business)  into respective panel. All should belong to same band.

Style is also same for all.

 

 

And I am trying to build the code into WPF. I am not seeing any of events.

I have changed TimelineTray "Urls" read only Property to read/write type TimelineEventCollection and Property as  Events. Is it not possible to set events dynamically thru code?

Window xaml:

 

 

  <Grid x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition
                Height="200" />         
        </Grid.RowDefinitions>
        
        <timeline:TimelineTray x:Name="timelineTray" Grid.Row="0" HorizontalAlignment="Stretch" CalendarType="hours">
            <Grid.RowDefinitions>
                <RowDefinition
                    Height="*" />
                <RowDefinition
                    Height="50" />
            </Grid.RowDefinitions>
         
            <timeline:TimelineBand
                Grid.Row="0"
                IsMainBand="True" CalendarType="hours"
                HorizontalAlignment="Stretch"
                TimelineWindowSize="20"
                MaxEventHeight="20" />
            <timeline:TimelineBand
                Grid.Row="1"
                HorizontalAlignment="Stretch"  CalendarType="hours"
                TimelineWindowSize="16"
                MaxEventHeight="4" />
        </timeline:TimelineTray>
    </Grid>

 

  <Grid x:Name="LayoutRoot">

        <Grid.RowDefinitions>
            <RowDefinition
                Height="200" />         
        </Grid.RowDefinitions>
        
        <timeline:TimelineTray x:Name="timelineTray" Grid.Row="0" HorizontalAlignment="Stretch" CalendarType="hours">
            <Grid.RowDefinitions>

                <RowDefinition
                    Height="*" />

                <RowDefinition
                    Height="50" />

            </Grid.RowDefinitions>
         
            <timeline:TimelineBand
                Grid.Row="0"
                IsMainBand="True" CalendarType="hours"
                HorizontalAlignment="Stretch"
                TimelineWindowSize="20"
                MaxEventHeight="20" />
            <timeline:TimelineBand
                Grid.Row="1"
                HorizontalAlignment="Stretch"  CalendarType="hours"
                TimelineWindowSize="16"
                MaxEventHeight="4" />
        </timeline:TimelineTray>

    </Grid>

Window CodeBehind Constructor:

 

 

  timelineTray.Events = timelineEntity.EventList;
                timelineTray.MinDateTime = timelineEntity.Begin;
                timelineTray.MaxDateTime = timelineEntity.End;
                timelineTray.InitialDateTime = timelineEntity.Begin;

 

 

 

 

 

Coordinator
Nov 4, 2009 at 11:00 PM

You do not need to change the property, this will not help. If you want to provide another source dinamically you have to call TimelineTray:ClearEvents and then TimelineTray:ResetEvents. For your grouping scenario what I could do is to allow specify line on which event is displayed. (By default line is calculated automatically). This way you could place sports on the same row and business on another row. let me know.

Coordinator
Nov 4, 2009 at 11:16 PM
Edited Nov 4, 2009 at 11:18 PM

One more thing: MinDateTime, MaxDateTime and InitialDateTime should not be changed once timeline is displayed/created, so should better be specified in xaml. If you want to move your timeline from the code behind then you need to change CurrentDateTime property, not InitialDateTime.

Nov 4, 2009 at 11:22 PM

Yeah..it is working now. Thank you. If you consider MainBand as band-1, other(bottom) as band-0.

1. I am trying to customize the Visible_Date_Part rectangle(band-0) for scrolling and zooming as in http://timerime.com/. Is it possible?

2. I have seen that Timeline tray is not starting/end with MinDateTime/MaxDateTime given, there is extra columns on left & right.

3.  And in http://www.simile-widgets.org/timeline/ there are different types of zooming available. Can we also do all on WPF? like band -0 zoomIn to depth, band-1 panning.

 

Thanks,

Kola

Coordinator
Nov 4, 2009 at 11:30 PM

1) Zooming as on timerime.com is not supported right now, but hit me with workitem and I will think on it for next release.

2) Yes, there are some extra columns on left and right. This is "by design".

3). This kind of zooming can be implemented, hit me with workitem for this also.

 

 

Nov 5, 2009 at 12:42 AM

Can I change the extra columns?

 

You mean IssueTracker to log the task?

Coordinator
Nov 5, 2009 at 2:53 AM

Yes, post issue in IssueTracker.

 

Nov 5, 2009 at 5:27 AM

Hi,

Are you able to share the WPF version yet?

Many thanks

Jay

Coordinator
Nov 5, 2009 at 5:24 PM

It will come after I done with silverlight release in about a week.

 

Nov 5, 2009 at 8:23 PM

What is the Method I need to check to remove the extra columns on timeline band?

 

Thanks,

Kola

Coordinator
Nov 5, 2009 at 10:18 PM

BuildColumns, see implementation of Zoom method

Nov 13, 2009 at 7:43 AM

Excellent, looking forward to the WPF version.

 

Coordinator
Nov 14, 2009 at 12:43 AM

You can start trying WPF version, it is not yet complete, but a good starting point.

 

Nov 16, 2009 at 8:46 PM

did you saw this timeline zoombar @ http://www.infragistics.com/dotnet/netadvantage/silverlight/data-visualization/xamwebzoombar.aspx#Overview

this best suites for timeline zoombar.

 

Coordinator
Nov 17, 2009 at 3:20 PM

Yes, this is probable a very good alternative to my control

Nov 17, 2009 at 3:38 PM

I hope you will also add these features to your control in future.