Visible Window Calculation

May 25, 2010 at 8:28 PM


I've been able to make some nice projects using your library.  Thanks for posting it!

One issue that I thought you might want to fix: if you set the MaxDateTime and the CurrentDateTime to be the same (in my case I was only showing past events so I set things so you would start at "now" and the Max was "now"), everything works fine but the VisibleWindow calculation is incorrect.  The MaxDateTime limits the visible window size and thus even when you scroll back in time you are left with a window that is smaller than the actual viewport on the main band.

The code is in FixPositions() in TimelineBuilder.cs.  You are taking the min of the index against the maxIndex after setting the columnindexes.  I'm not really sure why you should do that.  For the min calculation below you just Max versus 0.  In my version of the code I just replaced the line

//m_maxIndex = Math.Min(index, maxIndex);


m_maxIndex = index;

and things seem to be working as I would expect.  Please let me know if I am misunderstanding something here.



<font face="Consolas" size="2">





May 29, 2010 at 12:48 AM

Ok. Thanks, let's see if it works :)