I am trying to move a vertical line that represents the time advance.
This is the code for this vertical line creation:
XAML:
<s:SciChartSurface.RenderableSeries>
<s:FastLineRenderableSeries x:Name="lineSeries" SeriesColor="Red" />
<s:FastLineRenderableSeries x:Name="verticalTimeLine"SeriesColor="Green"/>
</s:SciChartSurface.RenderableSeries>
The line is initialized in the code behind as follows (C#):
var verticalLineTimeSeries = new XyDataSeries<float, float>();
verticalLineTimeSeries.Append(0.0f, 0.0f);
verticalLineTimeSeries.Append(0.0f, 10.0f);
verticalTimeLine.DataSeries = verticalLineTimeSeries;
And this is the code where i've made a test with RenderTransform to move the timeline:
TranslateTransform translateTransform = new TranslateTransform();
translateTransform.X = 400;
translateTransform.Y = 0;
verticalTimeLine.RenderTransform = translateTransform;
verticalTimeLine.UpdateLayout();
The problem is that the line does not move at all. What am i doing wrong? Thanks in advance.
Well, finally i've been able to resolve my problem by using Annotations. I'm going to post the code in case that someone has a similar problem
First on the Xaml part:
On UserControl Resources we set a simple style, green color and thicknes value 2:
The annotations:
And this is the code behind to test its movement: