This question is locked. New answers and comments are not allowed.
I have a custom Style in my control Resources:
Based on the MVVM pattern (without code behind!) I have the following Chart:
The code throws a System.Exception:
at MS.Internal.XcpImports.CheckHResult(UInt32 hr)
at MS.Internal.XcpImports.UIElement_Measure(UIElement element, Size availableSize)
at System.Windows.UIElement.Measure(Size availableSize)
at Telerik.Windows.Controls.Charting.LinearSeriesPanel.MeasureOverride(Size availableSize)
at System.Windows.FrameworkElement.MeasureOverride(IntPtr nativeTarget, Single inWidth, Single inHeight, Single& outWidth, Single& outHeight)
Cheers,
Jani
| <Style |
| x:Key="ActualScoreBarStyle" |
| TargetType="TelerikCharting:Bar"> |
| <Setter |
| Property="Template"> |
| <Setter.Value> |
| <ControlTemplate |
| TargetType="TelerikCharting:Bar"> |
| <Canvas> |
| <Rectangle |
| x:Name="PART_DefiningGeometry" |
| Height="{TemplateBinding ItemActualHeight}" |
| Width="{TemplateBinding ItemActualWidth}" |
| RadiusX="2" |
| RadiusY="2" |
| Fill="{StaticResource RedBrush}" |
| Stroke="Pink" |
| StrokeThickness="3" /> |
| </Canvas> |
| </ControlTemplate> |
| </Setter.Value> |
| </Setter> |
| </Style> |
Based on the MVVM pattern (without code behind!) I have the following Chart:
| <TelerikChart:RadChart |
| ItemsSource="{Binding MyData}"> ... |
| <TelerikChart:RadChart.SeriesMappings> |
| <TelerikCharting:SeriesMapping> |
| <TelerikCharting:SeriesMapping.SeriesDefinition> |
| ItemStyle="{StaticResource ActualScoreBarStyle}" /> |
| </TelerikCharting:SeriesMapping.SeriesDefinition> |
| </TelerikCharting:SeriesMapping> |
| </TelerikChart:RadChart.SeriesMappings> ... |
| </TelerikChart:RadChart> |
The code throws a System.Exception:
at MS.Internal.XcpImports.CheckHResult(UInt32 hr)
at MS.Internal.XcpImports.UIElement_Measure(UIElement element, Size availableSize)
at System.Windows.UIElement.Measure(Size availableSize)
at Telerik.Windows.Controls.Charting.LinearSeriesPanel.MeasureOverride(Size availableSize)
at System.Windows.FrameworkElement.MeasureOverride(IntPtr nativeTarget, Single inWidth, Single inHeight, Single& outWidth, Single& outHeight)
Cheers,
Jani