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

bind color Editor to the background and the gridlines

1 Answer 83 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Rick Mueller
Top achievements
Rank 1
Rick Mueller asked on 18 Apr 2012, 09:24 AM
Hello,
I tried to bind the controls thru xaml and code behind and no luck..

Any ideas ??
if (Bkgrd.SelectedColor != null && Bkgrd.SelectedColor is Color)
          {
              var color = (Color)Bkgrd.SelectedColor;
              DiaGrid.Background = new SolidColorBrush(color);
<telerik:RadDiagram.Background>
                                    <SolidColorBrush Color="{Binding SelectedColor, ElementName=Bkgrd}"/>
                                </telerik:RadDiagram.Background>

Thank you  for your time
Rick

1 Answer, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 18 Apr 2012, 10:15 AM
Hi Rick Mueller,

 You can bind the Background of the RadDiagram only to Brush, but not defined static in XAML like the way you have tried. You can use the Telerik's ColorToBrushConverter. Please check out this realized in the attached sample.

Greetings,
Petar Mladenov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
Diagram
Asked by
Rick Mueller
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Share this question
or