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

[Solved] Exception thrown after adding new dlls

3 Answers 267 Views
Chart for XAML
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Sajida
Top achievements
Rank 1
Sajida asked on 28 Aug 2012, 10:35 AM
Hi,

I have added the new telerik dlls(Controls,DataVisualisation,Primitives and Charts) to my solution and when it is run it is throwing the below exception.

Telerik.UI.Xaml.Controls.TemplateNotAppliedException: 

Exception of type 'Telerik.UI.Xaml.Controls.TemplateNotAppliedException' was thrown.

   at Telerik.UI.Xaml.Controls.RadControl.VerifyTemplateApplied()

   at Telerik.UI.Xaml.Controls.RadControl.ArrangeOverride(Size finalSize)

   at Telerik.UI.Xaml.Controls.RadChartBase.ArrangeOverride(Size finalSize)



Please let me know where I am going wrong. Please find below the xaml code of my page.

<UserControl

    x:Class="Microsoft.Focus.Metro.View.Widget.Widget"

    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

    xmlns:local="using:Microsoft.Focus.Metro.View.Widget"

    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"

    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"

    mc:Ignorable="d"

    xmlns:telerik="using:Telerik.UI.Xaml.Controls"

    d:DesignHeight="300"

    d:DesignWidth="400"> 

    <Grid  x:Name="LayoutRoot" x:FieldModifier="public" Background="Black" RenderTransformOrigin="0.5,0.5">

        <Grid.RenderTransform>

            <CompositeTransform/>

        </Grid.RenderTransform>

        <telerik:RadCartesianChart x:Name="StandardChart" x:FieldModifier="public" ClipToBounds="True">

            <telerik:RadCartesianChart.HorizontalAxis>

                <telerik:DateTimeCategoricalAxis x:Name="AreaHorizontalAxis"  LabelFitMode="Rotate"  />

            </telerik:RadCartesianChart.HorizontalAxis>

            <telerik:RadCartesianChart.VerticalAxis>

                <telerik:LinearAxis x:Name="AreaLinearAxis" MajorTickStyle="{StaticResource TransparentRectangle}" >

                    <telerik:LinearAxis.LabelStyle>

                        <Style TargetType="TextBlock">

                            <Setter Property="Width" Value="60"/>

                            <Setter Property="TextAlignment" Value="Right"/>

                            <Setter Property="VerticalAlignment" Value="Top"/>

                        </Style>

                    </telerik:LinearAxis.LabelStyle>

                </telerik:LinearAxis>

            </telerik:RadCartesianChart.VerticalAxis>

            <telerik:RadCartesianChart.Grid>

                <telerik:CartesianChartGrid x:Name="AreaCartesianChartGrid" MajorLinesVisibility="None" />

            </telerik:RadCartesianChart.Grid>

        </telerik:RadCartesianChart>

    </Grid>

</UserControl>

Thanks in advance

3 Answers, 1 is accepted

Sort by
0
Tsvyatko
Telerik team
answered on 30 Aug 2012, 02:07 PM
Hi Sajida,

 In the case where dlls are used you should make sure that all related resources are copied along with the dlls (all content in the themes and Telerik.UI.Xaml.* subfolders). What I can suggest as an easy way to ensure that all resources are copied properly is to copy C:\Program Files (x86)\Telerik\RadControls for Metro XAML Q1 2012 BETA\Binaries folder in your solution and add the references from there.

Let us know if this helps.

Kind regards,
Tsvyatko
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Sajida
Top achievements
Rank 1
answered on 31 Aug 2012, 06:02 AM
Hi Tsvyatko,

If I add the themes and all folders, it is becoming load on my project soln. Is it compulsory that we add all the folders??

Thanks in advance..

0
Georgi
Telerik team
answered on 04 Sep 2012, 03:24 PM
Hi Sajida,

Resource Dictionaries in WinRT are not compiled within the assembly but are separate assets. That is why you need these files residing in the same directory structure as in our Binaries folder. The easiest part would be to just reference the RadControls for Metro extension package and build your application without referencing stand-alone assemblies.

I hope this helps. Let us know how it goes.

Kind regards,
Georgi
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
Chart for XAML
Asked by
Sajida
Top achievements
Rank 1
Answers by
Tsvyatko
Telerik team
Sajida
Top achievements
Rank 1
Georgi
Telerik team
Share this question
or