Hi Infragistics Team,
I have a XamDataChart with a valueoverlay.
I'm using a style to set the control template.
That causes a nullptr exception in the xaml-editor and in the runtime thrown in some ig-method.
Please check this.
kmb
Hello Karl,
I am just checking if you require any further assistance on the matter.
Thank you for your feedback. I have been looking into your question and the best approach in this scenario seems to be to make the default value overlay line invisible by access its visual element. This can be done handling the ‘Loaded’ event of Value Overlay and using our ‘Utilities’ class like e.g. :
private void valueOverlay_Loaded(object sender, RoutedEventArgs e)
{
Canvas canvas = Utilities.GetDescendantFromName(this.valueOverlay, "RootCanvas") as Canvas;
canvas.Children[2].Visibility = System.Windows.Visibility.Collapsed; // the default line
}
Let me know, if you need any further assistance on this matter.
Ok, i Need to go a step back.
You wrote;
I was wondering why you want to bind the ‘Background’ of the Border your custom template to the original brush of the value overlay.
My Answer:
Ok, i wanted to bind the Background so that the line i draw has the same Color as the original line.
But that didn't work because ValueOVerlay.Background only defines a "override" value which is null by Default.
You said i shall then define the Color list by myself and use the first Color for drawing the Background that was ok.
It would be more flexible if i had a property that contained the generated Color for the series but that works out fine.
This is solved. I can now draw a value overlay by my self. :-)
Now the next:
You wrote:
If you set the value overlay’s brush to “Transparent” and set another brush for the border in your custom control, it
seems that the original line of the value overlay will not be shown.
That is correct. The original line will not be drawn because it is transparent i.e. has a thickness of 0.
But then the history item will be empty, as it draws the line also transparent / thickness 0.
Then my question is:
How can i draw a line in the history item when the value overlay is transparent and/or has a 0 thickness.
I have been looking into your issue and it seems that you have in mind the custom control that you are using in the template of the value overlay by history item. I was wondering why you want to bind the ‘Background’ of the Border your custom template to the original brush of the value overlay. If you set the value overlay’s brush to “Transparent” and set another brush for the border in your custom control, it seems that the original line of the value overlay will not be shown.
Yes there popped up another issue.
So i'm using a canvas to draw my own value overlay line which can be moved with the mouse. But the original line is still drawn.
As i want to Show a Special mouse Cursor and also Need to react on the mouse Events when the mouse is over the valueoverlay line
the only way i found is Setting the thickness of the value overlay to 0.
(Otherwise the mouse Cursor won't be shown on the original line and also dragging is not possible)
But when i set thickness to 0 the history does no more Display the line.
But i would like to have a line in the history item.
I was investigating a bit in the history issue and it seems it's not so easy to define a template for the history item.
Do you have an idea how i can Display the line in the history?