I am using the Timeline with a DateTimeSeries and version 11.1
I have hidden the scene so only the preview in the zoombar is visible
I am trying to show my users the scale of the points in the timeline by styling the eventPoint
I've used the following http://blogs.msdn.com/b/delay/archive/2009/11/02/as-the-platform-evolves-so-do-the-workarounds-better-settervaluebindinghelper-makes-silverlight-setters-better-er.aspx to allow binding to my data in the style static resource
I overrode the content template for the ig:EventPoint and replaced it with an ellipse that binds the height and width to a value in my view model. The range of values is from 10 to 40
Everything works and the eventPoints are different sizes but for larger eventPoints the ellipse is clipped. Is there anyway I can avoid this?
My ControlTemplate is as follows
<ControlTemplate TargetType="ig:EventPoint><Grid><Ellipse Width={TemplateBinding Width} Height={TemplateBinding Height} /></Grid></ControlTemplate>
The width and height are then set in the style that contains the template.
Hi,
Try removing the width/height bindings:
<ControlTemplate TargetType="ig:EventPoint><Grid><Ellipse /></Grid></ControlTemplate>
Hi, If I do this the event points don't appear at all.
What I am trying to do is have the event points display as circles of varying sizes.
Which I can get to work but the display is clipped so for the larger circles they look like half circles or circles with a portion on the right side cut off.
Amy
Is it possible to send me your sample? Or a screenshot?
Hello Amy,
Thank you for your feedback. I am glad that you resolved your issue and I believe that other community members may benefit from this as well.
Thanks again.
I figured it out myself. I found an example in the samples (Live Data) where they styled the event points with an ellipse. I had to apply the width to the grid not the ellipse and it worked.
<ControlTemplate TargetType="ig:EventPoint><Grid Width={TemplateBinding Width} Height={TemplateBinding Width}><Ellipse /></Grid></ControlTemplate>
I will post another question for the problem with hiding the scene.
Thanks anyways.
HI, Unfortunately the code and application is on our internal intranet so I can't provide a code sample or screenshot but I've tried to fake it for you.
Here is a snippet of the XAML that I've retyped out.
<ig:XamTimeline x:Name="timeline" Height="70"><ig:XamTimeline.Axis><ig:DateTimeAxis /></ig:XamTimeline.Axis><ig:XamTimeLine.PreviewAxis><ig:PreviewAxis ShowLabels="True"></ig:XamTimeLine.PreviewAxis><ig:XamTimeline.Series><ig:DateTimeSeries DataSource="{Binding TimeSeries}" EventPointStyle="{StaticResource EventPointStyle}" DataMapping="Time=DateTime;Details=Count;" /></ig:XamTimeline.Series></ig:XamTimeline>
The data it is bound to is an ObservableCollection<T> where T is a class with a DateTimeField and an int
The eventPointStyle just sets the width and height of the points and overrides the template to use an ellipse. I have tried hard coding those to 35 with the same result.
Also I am hiding the legend and the Scene (by setting the opacity to 0) . Although if I show them I get the same behaviour
Note: I also have an issue that when I set the MinHeight property on the TimeLine the eventPoints disappear So I have a white bar at the top where the scene is.