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

Using RadChart in CustomControl

3 Answers 50 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Kendrew
Top achievements
Rank 1
Kendrew asked on 26 Feb 2011, 12:33 AM
I am use the RadChart in a CustomControl which used to work in the 2009 version of the control. Now that I have upgraded the controls to the 2010 Q3 SP1 version the control no longer works.

The problem is that - looking in snoop - the control has no visual tree. I have reduced the generic style to the following;

<Style TargetType="{x:Type asc:CustomControl1}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type asc:CustomControl1}">
                    <Grid>
                        
                        <Grid.Background>
                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"  >
                                <GradientStop Color="#FFDCE7FD" Offset="1"/>
                                <GradientStop Color="#FF898AAC" Offset="0"/>
                            </LinearGradientBrush>
                        </Grid.Background>
                        
                        <telerik:RadChart x:Name="PART_AscChart" />

                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>

    </Style>

The piece which I believe causes the problem is that the assemblies are loaded through a custom assembly loader at runtime, so I suspect that the generic style for RadChart is not being located.

Any ideas would be appreciated.

Thanks
Kendrew

3 Answers, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 02 Mar 2011, 04:44 PM
Hi Kendrew,

We tested your scenario with a new custom control and unfortunately couldn't reproduce the problem that you are mentioning. Perhaps the cause for the problem is not in the XAML section that you are sending to us.

I have attached a small runnable sample application that has RadChart included in custom control. Please test it in your environment and check if it runs.

Greetings,
Yavor Ivanov
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Kendrew
Top achievements
Rank 1
answered on 04 Mar 2011, 04:14 PM
Thanks, I was just in the process of creating a simple project that reproduces the problem but I will use yours and modify accordingly to see if we can reproduce the issue.
0
Yavor
Telerik team
answered on 09 Mar 2011, 12:24 PM
Hello Kendrew,

Since you moved your your question to a support thread I am closing this thread.

Regards,
Yavor Ivanov
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
Chart
Asked by
Kendrew
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Kendrew
Top achievements
Rank 1
Share this question
or