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

Line Color

6 Answers 101 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Harald Braunstein
Top achievements
Rank 1
Harald Braunstein asked on 16 Jun 2009, 03:32 PM
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

6 Answers, 1 is accepted

Sort by
0
Kiril Stanoev
Telerik team
answered on 17 Jun 2009, 02:22 PM
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.
0
Harald Braunstein
Top achievements
Rank 1
answered on 17 Jun 2009, 02:59 PM
Hi Kiril,

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

Thank You for your answer.
0
Accepted
Kiril Stanoev
Telerik team
answered on 17 Jun 2009, 03:32 PM
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.
0
Harald Braunstein
Top achievements
Rank 1
answered on 18 Jun 2009, 08:09 AM
It's working fine. Thank You very much.
0
Phil Cockfield
Top achievements
Rank 1
answered on 02 Dec 2009, 09:15 PM
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
0
Kiril Stanoev
Telerik team
answered on 04 Dec 2009, 08:34 AM
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.
Tags
TreeView
Asked by
Harald Braunstein
Top achievements
Rank 1
Answers by
Kiril Stanoev
Telerik team
Harald Braunstein
Top achievements
Rank 1
Phil Cockfield
Top achievements
Rank 1
Share this question
or