Line Color

7 posts, 1 answers
  1. Harald Braunstein
    Harald Braunstein avatar
    11 posts
    Member since:
    Sep 2006

    Posted 16 Jun 2009 Link to this post

    Hello,

    is there possible to change color of line in tree view? when I tried to change HorizontalLine and VerticalLine in template, it only affects root item, not below.

    Thanks.

    Dana
  2. Kiril Stanoev
    Admin
    Kiril Stanoev avatar
    1512 posts

    Posted 17 Jun 2009 Link to this post

    Hi Harald,

    Are you talking about the separator that appears while dragging items?
    If this is the case, then you have to edit the Template of RadTreeView. In the Template there is a resource with the following key:

    <SolidColorBrush x:Key="DragBetweenItemsFeedback_BackgroundBrush" Color="#FFFA8C3B"/> 

    Changing the color of this SolidColorBrush will change the color of the separator.
    If you have any additional questions, let us know.

    Regards,
    Kiril Stanoev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. Harald Braunstein
    Harald Braunstein avatar
    11 posts
    Member since:
    Sep 2006

    Posted 17 Jun 2009 Link to this post

    Hi Kiril,

    No, I think the line between tree items, which can be visible with IsLineEnabled="True"

    Thank You for your answer.
  4. Answer
    Kiril Stanoev
    Admin
    Kiril Stanoev avatar
    1512 posts

    Posted 17 Jun 2009 Link to this post

    Hi Harald,

    Sorry for the misunderstanding.
    This time you will have to edit the Template of RadTreeViewItem and look for a resource called RadTreeView_LineColor. If you want to make the lines bolder, you will have to edit two rectangles - HorizontalLine and VerticalLine in the template (around line #456 in the project I am attaching).

    Let us know how this works for you.

    Kind regards,
    Kiril Stanoev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  5. Harald Braunstein
    Harald Braunstein avatar
    11 posts
    Member since:
    Sep 2006

    Posted 18 Jun 2009 Link to this post

    It's working fine. Thank You very much.
  6. Phil Cockfield
    Phil Cockfield avatar
    1 posts
    Member since:
    Dec 2009

    Posted 02 Dec 2009 Link to this post

    With the Q3 2009 release these lines suddenly got a whole lot darker.

    Is there a way to edit this without branching hundreds of lines of XAML templates?  I just want to edit the color.  

    Any chance you could show me the most minimal templating code I can use against the treeview to edit that line color.

    Thanks
  7. Kiril Stanoev
    Admin
    Kiril Stanoev avatar
    1512 posts

    Posted 04 Dec 2009 Link to this post

    Hi Phil,

    The only way to edit the color of the line is to edit the ControlTemplate of RadTreeView. We are planning to improve this process in the future, by introducing a style property for the line, but for the moment editing the ControlTemplate is the only option. Bellow you can see how the line will look like with our Service Pack 1 release.


    Let me know if you have additional questions or comments.

    Kind regards,
    Kiril Stanoev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top