bind color Editor to the background and the gridlines

2 posts, 0 answers
  1. Rick Mueller
    Rick Mueller avatar
    103 posts
    Member since:
    Feb 2010

    Posted 18 Apr 2012 Link to this post

    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
  2. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 18 Apr 2012 Link to this post

    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 >>

  3. DevCraft banner
Back to Top