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.
I have been looking into your question and the default brushes(colors) for the series are defined internally and they repeat themselves after stacking 5 series. The ValueOverlay is a part of the series of the XamDataChart and it automatically applies one the these default colors. You can define your own set of colors for the XamDataChart like e.g. :
<ig:XamDataChart.Brushes>
<ig:BrushCollection>
<SolidColorBrush Color="Orange"/>
<SolidColorBrush Color="Yellow"/>
<SolidColorBrush Color="Pink"/>
<SolidColorBrush Color="Purple"/>
<SolidColorBrush Color="Honeydew"/>
<SolidColorBrush Color="Indigo"/>
</ig:BrushCollection>
</ig:XamDataChart.Brushes>
If you would like to set to your border the current brush of the value overlay you can do it like :
Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ActualBrush}"
Let me know, if you have any other questions on this matter.
Hi,
sorry, i don't want to Change the Color.
I want to determine the Color which was automatically assigned. It seems it is another property because brush always contains null.
(I want to bind my templated Line to the original Color which is used by ValueOverlay)
Is this possible?
<ig:ValueOverlay.Style>
<Style TargetType="{x:Type ig:ValueOverlay}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate>
<Canvas x:Name="RootCanvas">
<my:CValueOverlayContentControl Cursor="Help" Width="100" >
<!-- ValueOverlay.Brush contains null. How to bind to the Color? -->
<Border Background="{Binding Brush,RelativeSource={RelativeSource AncestorType=ig:ValueOverlay, AncestorLevel=1}}"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" />
</my:CValueOverlayContentControl>
</Canvas>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ig:ValueOverlay.Style>
Hello,
Thank you for your feedback. If you want to change the color of the value overlay, you need to set its ‘Brush’ property.
Let me know, if you need any further assistance on this matter.
i've written a Content control that can be placed inside the canvas. It autmatically updates it's canvas Position so it is possible to place any control in the value overlay-line. I'll paste the source later as solution.
Before i have one more question: How can i determine the actual Color of the value overlay? (The Color is automatically assigned, i found this Color is not available via ValueOverlay.Foreground or ValueOverlay.Background.)
Which property reflects this Color?
Thanx in advance.