This is a migrated thread and some comments may be shown as answers.

SplineSeriesStyle resource could not be resolved.

1 Answer 37 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Dmitry
Top achievements
Rank 1
Dmitry asked on 27 Jul 2017, 07:48 AM

Hello. In View that is inside Prism Module in MVVM multimodule Prism application I have the following XAML line:

<Style TargetType="telerik:SplineSeries" BasedOn="{StaticResource SplineSeriesStyle}">

SplineSeriesStyle resource could not be resolved. Herewith "BasedOn="{StaticResource SplineSeriesStyle}" substring is underlined by a blue wavy line. When I move the mouse cursor to this underlined substring then "SplineSeriesStyle resource could not be resolved" error message is displayed. I use Prism UserControl as the View where abovementioned XAML is placed. Below is XAML of the View with some reductions:

<UserControl x:Class="Telecom.Flowmeter.Modules.MeterReading.Views.MeterReadingView"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
             xmlns:prism="http://prismlibrary.com/"
             Style="{StaticResource CommonViewStyle}"
             prism:ViewModelLocator.AutoWireViewModel="True"
             xmlns:views="clr-namespace:Telecom.Flowmeter.Modules.MeterReading.Views"
             xmlns:c="clr-namespace:Telecom.Flowmeter.Modules.MeterReading.Converters"
             mc:Ignorable="d">
 
    <FrameworkElement.Resources>
        . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
        <!--Шаблон, определяющий представление окна графика измеряемого параметра-->
        <DataTemplate x:Key="ContentTemplate">
            <Grid>
                . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
                <Grid>
                    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
 
                    <!--Series color visualizer-->
                    <telerik:RadLegend Grid.Row="0" Grid.Column="1" Items="{Binding LegendItems, ElementName=splineAbsoluteChart}" HorizontalAlignment="Right" VerticalAlignment="Top"
                           Visibility="{Binding IsAbsoluteSplineChartVisible}"/>
                    <!--Spline chart-->
                    <telerik:RadCartesianChart x:Name="splineAbsoluteChart" Grid.Row="0" Grid.Column="0" Visibility="{Binding IsAbsoluteSplineChartVisible}" Palette="{StaticResource customPalette}">
                        <!--Turn vertical and horizontal scrollbars off-->
                        <telerik:RadCartesianChart.Resources>
                            <Style TargetType="telerik:PanZoomBar">
                                <Setter Property="Visibility" Value="Collapsed"/>
                            </Style>
                        </telerik:RadCartesianChart.Resources>
                        <!--X axis-->
                        <telerik:RadCartesianChart.HorizontalAxis>
                            <telerik:DateTimeContinuousAxis MajorStepUnit="Second" LabelInterval="5" LabelFormat="hh:mm:ss" FontFamily="Segoe UI" PlotMode="OnTicks" TickOrigin="{Binding AlignmentDate}"/>
                        </telerik:RadCartesianChart.HorizontalAxis>
                        <!--Y axis---->
                        <telerik:RadCartesianChart.VerticalAxis>
                            <telerik:LinearAxis FontFamily="Segoe UI" Title="{Binding Title_Y}" />
                        </telerik:RadCartesianChart.VerticalAxis>
                        <!--Layout grid-->
                        <telerik:RadCartesianChart.Grid>
                            <telerik:CartesianChartGrid MajorLinesVisibility="XY" MajorXLineDashArray="3,4" MajorYLineDashArray="3,4"/>
                        </telerik:RadCartesianChart.Grid>
                        <!--Series provider-->
                        <telerik:RadCartesianChart.SeriesProvider>
                            <telerik:ChartSeriesProvider Source="{Binding SeriesData}">
                                <telerik:ChartSeriesProvider.SeriesDescriptors>
                                    <telerik:CategoricalSeriesDescriptor CategoryPath="Category" ValuePath="Value" ItemsSourcePath="ChartPoints">
                                        <telerik:CategoricalSeriesDescriptor.TypeConverter>
                                            <c:SeriesTypeConverter/>
                                        </telerik:CategoricalSeriesDescriptor.TypeConverter>
                                        <!--Visualize series on the computer screen-->
                                        <telerik:CategoricalSeriesDescriptor.Style>
                                            <!-- !!! THE NEXT LINE IS THE PROBLEM ONE !!! -->
                                            <Style TargetType="telerik:SplineSeries" BasedOn="{StaticResource SplineSeriesStyle}">
                                                <!--Marks and naming of the series-->
                                                <Setter Property="LegendSettings" Value="{Binding  SeriesName, Converter={StaticResource StringToLegendSettingsConverter}}"/>
                                                <!--Each series thickness-->
                                                <Setter Property="StrokeThickness" Value="2"/>
                                            </Style>
                                        </telerik:CategoricalSeriesDescriptor.Style>
                                    </telerik:CategoricalSeriesDescriptor>
                                </telerik:ChartSeriesProvider.SeriesDescriptors>
                            </telerik:ChartSeriesProvider>
                        </telerik:RadCartesianChart.SeriesProvider>
                        <!--Behaviors-->
                        <telerik:RadCartesianChart.Behaviors>
                            <telerik:ChartPanAndZoomBehavior DragMode="Pan" ZoomMode="Both"  PanMode="Both"/>
                        </telerik:RadCartesianChart.Behaviors>
                    </telerik:RadCartesianChart>
                    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
                </Grid>
            </Grid>
        </DataTemplate>
    </FrameworkElement.Resources>
 
    <Grid>
        <telerik:RadTileView PreservePositionWhenMaximized="True" MinimizedColumnWidth="150" ItemTemplate="{StaticResource ItemTemplate}"
                             ContentTemplate="{StaticResource ContentTemplate}" ItemsSource="{Binding MeasuredParameterCharts}"/>
    </Grid>
</UserControl>

The Shell in my application is standart WPF window (!!! not telerik:RadWindow !!!). This is dictated by the requirements of the technical assignment for the application. There are no Telerik references in Shell project in the solution. But the Prism Module (where abovementioned XAML is located) has the following Telerik references: Telerik.Windows.Controls, Telerik.Windows.Controls.Chart, Telerik.Windows.Controls.Navigation and Telerik.Windows.Data. The version of all these DLLs is 2017.1.117.40. In the solution, Shell project is in different folder then Prism Module projects are. Why SplineSeriesStyle resource could not be resolved? Please help.

1 Answer, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 31 Jul 2017, 10:47 AM
Hello Yaroslav,

Without your project I cannot be sure what happens, however it seems that the SplineSeriesStyle cannot be found in the project that uses the module with the chart. Note in order to use the code from a third party dlls into another project you will need to also add the required assemblies there and in this case you will need to also merge the resource dictionaries.

So, in your scenario you can add the Telerik assemblies and merge the Telerik ResourceDictionaries also in the Shell project that uses the module. Otherwise, they won't be loaded.

Regards,
Martin Ivanov
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
ChartView
Asked by
Dmitry
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Share this question
or