Okay. I have a Timeline where I want to read the number and names of the series from a database, then generate the points in each series to be displayed. I can't get any sort of binding to work for the Series.
I also want to change the shape of the points on the timeline.
Are these achievable?
Okay. I see my points reliably. I also have both top and bottom points. The issue with the positioning was that the top/bottom value wasn't making it from my local data to the NumericTimeSeries.
My timeline goes from 0 to 10000. My points have times such as 50, 100, etc. At any specific time, there can be at most two points (one top and one bottom). The point is drawn above or below the timeline axis depending on the top/bottom setting. However, the points are positioned startingat the time, not centered on the time. I was setting the duration to 1, so I thought, "That's what I'm telling it to do." So, I changed the time to be 49.5, with a duration of 1, so it would be centered on 50. No luck. The point still starts at 50. I'm going to try removing the duration value to see if that helps. Since many of your examples don't set duration, it seems that it is not required, and in my case, is misleading.
My events class is simply a class with time and name properties. I use the name property to manually set the Title. My series class contains type, image (a bitmap), and location properties. I use the type to set the series name, and copy the location to Position. I'd like to get the XamTimeline to use the image for the EventPoint. In your last post, you suggested setting up a style targeting EventPoint. I created a style in XAML, but can't get it to use the image from the data.
Thanks for your help.
P.S. I see the forum telling me my trial ends in about 20 days. I have a licensed version of the software, how do I get that information communicated to the forum?
Okay. I finally see points on my timeline. But, not always. Also, I have some series setup for TopOrLeft and some BottomOrRight, and only ever see TopOrLeft points (when present, the BottomOrLeft points have the same Time as the TopOrLeft points). Any tricks I need to know for this, or is it just more of my "sometimes" issues?
As for creating a style that targets EventPoint, would it be possible to have that style get the image from the series (a binding)?
Hi Joe,
Setting the Duration should indeed result in EventPoints being used on the timeline. I tried this with my sample data in that sample I sent earlier and I do indeed see that. From there it should just be a matter of creating an Style that targets EventPoint and retemplate it to include the desired image. You will probably need to adjust the behavior code where it creates the NumericTimeSeries / DateTimeSeries and set the EventPointStyle property to your custom style.
I don't think a Dispatcher.BeginInvoke is necessary in the OnSeriesSourceCollectionChanged handler as this should be firing after the XamTimeline has already finished initialization... probably. Granted it probably doesn't hurt to have it anyway. It's hard to know why you don't see any points on the timeline without knowing what your data is but you should be able to stick a breakpoint inside ResetTimeline and step through it and see if it's creating the series and adding it to the timeline. The important things would be to make sure that the DataSource of the timeline is getting bound correctly as well as the DataMapping property. My original code was setting this as a Binding so make sure the binding's Path and Source are correct.
If possible, it would be helpful to see at least the structure of your data. I don't need the values or anything, just what the classes look like. I can create similar looking classes and add dummy values to the properties in my sample in order to try and reproduce your issue.
This solution mostly works. I added a call to Dispatcher.BeginInvoke for ResetTimeLine to the OnSeriesSourceCollectionChanged, and it gets called, but I am not seeing my events on the timeline.
I'd like to use my own bitmaps for the event points, as well. I'm setting duration to 0, since I want points, not lines, but perhaps that is part of the problem, too?
I'm working on a machine that is not connected to the Internet, that's why I haven't been providing my solution. I realize this hides the stupid stuff I'm doing that you haven't a clue about.
Yes, you understand my desire correctly. I'll look at the sample, and check it out.
Thanks.
It will likely be several business days before I can know whether this is the "answer" or not. I'll be sure to reply back here when I've determined that (or hit another road-block).
Oh, and yes, I care about MVVM. That's the reason for all this.