This question is locked. New answers and comments are not allowed.
When I used Expression Blend to copy the Legend's Style into my App.xaml, it inserted XAML that throws these errors:
The property 'Binding' does not exist on the type 'RadWrapPanel' in the XML namespace 'http://schemas.telerik.com/2008/xaml/presentation'.
The attachable property 'Binding' was not found in type 'BindingHelper'.
This code is in the Template setter:
The error is on the <telerik:BindingHelper.Binding> line. What do I need to do to make this work?
The property 'Binding' does not exist on the type 'RadWrapPanel' in the XML namespace 'http://schemas.telerik.com/2008/xaml/presentation'.
The attachable property 'Binding' was not found in type 'BindingHelper'.
This code is in the Template setter:
<Setter Property="ItemsPanel"> <Setter.Value> <ItemsPanelTemplate> <telerik:RadWrapPanel> <telerik:BindingHelper.Binding> <telerik:BindingProperties RelativeSourceAncestorType="ChartLegend" SourceProperty="ItemsPanelOrientation" TargetProperty="Orientation"/> </telerik:BindingHelper.Binding> </telerik:RadWrapPanel> </ItemsPanelTemplate> </Setter.Value> </Setter>The error is on the <telerik:BindingHelper.Binding> line. What do I need to do to make this work?
6 Answers, 1 is accepted
0
Hello Brian,
I have tested this with our latest version and it works as expected without any errors. This is the output of editing the Chart legend in Blend:
Please watch this video and let me know which version of telerik controls you use in your application.
Best wishes,
Sia
the Telerik team
I have tested this with our latest version and it works as expected without any errors. This is the output of editing the Chart legend in Blend:
<SolidColorBrush x:Key="LegendForeground" Color="#FF000000"/><LinearGradientBrush x:Key="LegendBackground" EndPoint="1.96,0.5" StartPoint="-0.96,0.5"> <GradientStop Color="#FFB5B5B5"/> <GradientStop Color="#FFF0F0F0" Offset="0.5"/></LinearGradientBrush><SolidColorBrush x:Key="LegendBorderBrush" Color="#FF848484"/><Thickness x:Key="LegendBorderThickness">1</Thickness><telerik:MarkerShape x:Key="LegendItemMarkerShape">SquareRounded</telerik:MarkerShape><telerik:TextToVisibilityConverter x:Key="textToVisibilityConverter"/><Style x:Key="ChartLegendStyle1" TargetType="telerik:ChartLegend"> <Setter Property="Foreground" Value="{StaticResource LegendForeground}"/> <Setter Property="Background" Value="{StaticResource LegendBackground}"/> <Setter Property="Padding" Value="10,10,10,5"/> <Setter Property="Margin" Value="0"/> <Setter Property="BorderBrush" Value="{StaticResource LegendBorderBrush}"/> <Setter Property="BorderThickness" Value="{StaticResource LegendBorderThickness}"/> <Setter Property="HeaderFontWeight" Value="Bold"/> <Setter Property="HorizontalContentAlignment" Value="Stretch"/> <Setter Property="VerticalContentAlignment" Value="Stretch"/> <Setter Property="LegendItemMarkerShape" Value="{StaticResource LegendItemMarkerShape}"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="telerik:ChartLegend"> <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}"> <Grid Margin="{TemplateBinding Padding}"> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="*"/> </Grid.RowDefinitions> <ContentControl ContentTemplate="{TemplateBinding HeaderTemplate}" Content="{TemplateBinding Header}" Foreground="{TemplateBinding Foreground}" FontWeight="{TemplateBinding HeaderFontWeight}" HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch"/> <ItemsPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Grid.Row="1" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/> </Grid> </Border> </ControlTemplate> </Setter.Value> </Setter> <Setter Property="ItemsPanel"> <Setter.Value> <ItemsPanelTemplate> <telerik:RadWrapPanel> <telerik:BindingHelper.Binding> <telerik:BindingProperties RelativeSourceAncestorType="ChartLegend" SourceProperty="ItemsPanelOrientation" TargetProperty="Orientation"/> </telerik:BindingHelper.Binding> </telerik:RadWrapPanel> </ItemsPanelTemplate> </Setter.Value> </Setter> <Setter Property="HeaderTemplate"> <Setter.Value> <DataTemplate> <Grid> <TextBlock FontSize="12" Height="Auto" Padding="0,0,0,2" TextWrapping="Wrap" Text="{Binding}" Visibility="{Binding Converter={StaticResource textToVisibilityConverter}}" Width="Auto"/> </Grid> </DataTemplate> </Setter.Value> </Setter></Style>Please watch this video and let me know which version of telerik controls you use in your application.
Best wishes,
Sia
the Telerik team
Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!
0
Brian
Top achievements
Rank 1
answered on 27 Jul 2011, 02:16 PM
Sia,
We are using the Q1 2011 version. Your legend style/template looks the same as the one I generated. I tried pasting your output into my App.xaml and I got slightly different errors this time:
Ambiguous type reference. A type named 'BindingHelper' occurs in at least two namespaces, 'Telerik.Windows.Controls' and 'Telerik.Windows.Data'. Consider adjusting the assembly XmlnsDefinition attributes.
The attachable property 'Binding' was not found in type 'BindingHelper'.
My xmlns lines for my App.xaml are:
We are using the Q1 2011 version. Your legend style/template looks the same as the one I generated. I tried pasting your output into my App.xaml and I got slightly different errors this time:
Ambiguous type reference. A type named 'BindingHelper' occurs in at least two namespaces, 'Telerik.Windows.Controls' and 'Telerik.Windows.Data'. Consider adjusting the assembly XmlnsDefinition attributes.
The attachable property 'Binding' was not found in type 'BindingHelper'.
My xmlns lines for my App.xaml are:
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" xmlns:System="clr-namespace:System;assembly=mscorlib"
0
Hello Brian,
We have tried to reproduce the described problematic behavior but unfortunately without any success. Is it possible to send us a small runnable application where such error can be observed?
Another option is to try to upgrade to Q1 SP1 or Q2 and check whether the same error occurs.
Please let us know whether one of the above two is possible.
Kind regards,
Sia
the Telerik team
We have tried to reproduce the described problematic behavior but unfortunately without any success. Is it possible to send us a small runnable application where such error can be observed?
Another option is to try to upgrade to Q1 SP1 or Q2 and check whether the same error occurs.
Please let us know whether one of the above two is possible.
Kind regards,
Sia
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>
0
Brian
Top achievements
Rank 1
answered on 29 Jul 2011, 02:31 PM
Sia,
How do I send you the small application I have created? The forum attachments do not allow .zip files.
How do I send you the small application I have created? The forum attachments do not allow .zip files.
0
Hello Brian,
Please open a support ticket and attach it there.
Regards,
Sia
the Telerik team
Please open a support ticket and attach it there.
Regards,
Sia
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>
0
Douglas
Top achievements
Rank 1
answered on 19 Aug 2011, 03:36 AM
There are two version of BindingHelper but the one the Legend Style needs is
xmlns:Telerik_BindingHelper="clr-namespace:Telerik.Windows.Data;assembly=Telerik.Windows.Data"