9 Answers, 1 is accepted
In order to change the default behavior of a mouseover, you need to access the following property:
ControlSubItem_Background_MouseOver - a brush that represents the background of the RadTreeViewItem, when the mouse is over it.
You can quickly and easily do this by editing a copy of the style and just changing the color assigned to that property. If you go to this documentation, you'll find a tutorial that takes you step by step through the process. Look under the title "Modifying the Default Style"
It should only take a couple minutes make the changes. However, if you find yourself getting hung up on something, let me know and we'll go through it together (I would need the XAML from the file you want the changes to take place in).
I do not have Expression Blend, just VS 2010. How do I get the default style?
Can you provide me with your xaml of the control you are using? Use the little Code block button above, next to the spell checker to paste in the xaml.
Sorry, here's the XAML for the tree:
Thank you for your code, I'll get started on it right now. I highly recommend you get Expression Blend. It is an extremely powerful tool when coupled with telerik's controls. Thats why you see the styling examples done with Blend. Here is the link to get the trial, you have full access in the trial.
I'll let you know when I am done with your styling.
Okay I'm back,
I had a little trouble using your XAML due to the other dependencies, so I started from scratch where you could get a better look at the template. The code block below contains a full resource of all the parts of a RadTreeViewItem. You'll find the part where I altered simply by doing a quicker search for AliceBlue. The principle is the same for all the other parts. With this template you have complete control over it's appearance. You could go in there and shorten the margins of the parts you'd like. Instead of reading through the whole style to see what is what, use this documentation to know where to look.
I added a small RadTreeView in the root grid to demonstrate how you can apply a template to a TreeViewItem. I hope this helps you achieve what you're looking for!
Good luck Janene,
When we edit the template, we are overriding the style built in by telerik. This is an exact copy of the the control's style (excpet a swap out of the gradient you wanted) that comes with the controls, except now it is in your pages resources section.
Have no worries, you'll see the same performance you see when using the control right out of the box. However, now you can see what telerik puts into the visuals of their controls. Thats why they are smooth and responsive =)
If it makes it easier, just use this Visual Studio shortcut ctrl-M followed by ctrl-L. This will collapse/expand all nodes. Its how I personally find my way through a large visual tree ;)