Hi All,
I searched on internet for the solution but didn't find any solution. I am using RadTreeView control, when I move mouse over treeview, nodes get highlighted. I used following ways but no luck.
private void radTreeList_NodeMouseMove(object sender, RadTreeViewMouseEventArgs e)
{
e.Node.BackColor = Color.Transparent; // Remove hover background
}
private void radTreeList_NodeFormatting(object sender, TreeNodeFormattingEventArgs e)
{
e.NodeElement.BackColor = Color.Transparent; // Remove hover background
e.NodeElement.DrawFill = false; // Disable fill
if (e.Node.Selected)
{
e.Node.BackColor = Color.Blue; // Default background
e.Node.ForeColor = Color.White; // Default text color
}
else
{
e.NodeElement.ContentElement.ResetValue(LightVisualElement.BackColorProperty, ValueResetFlags.Local);
e.NodeElement.ContentElement.ResetValue(LightVisualElement.ForeColorProperty, ValueResetFlags.Local);
}
}
Kindly provide me solution, stuck on this for a long time.
Thanks
Hi All,
I have implemented the Telerik window tree view control in my project, in output when I move mouse over nodes, get highlighted. I need to remove that one.
I tried the following ways but no luck.
private void radTreeList_NodeMouseMove(object sender, RadTreeViewMouseEventArgs e)
{
e.Node.BackColor = Color.Transparent; // Remove hover background
}
private void radTreeList_NodeFormatting(object sender, TreeNodeFormattingEventArgs e)
{
e.NodeElement.BackColor = Color.Transparent; // Remove hover background
e.NodeElement.DrawFill = false; // Disable fill
if (e.Node.Selected)
{
e.Node.BackColor = Color.Blue; // Default background
e.Node.ForeColor = Color.White; // Default text color
}
else
{
e.NodeElement.ContentElement.ResetValue(LightVisualElement.BackColorProperty, ValueResetFlags.Local);
e.NodeElement.ContentElement.ResetValue(LightVisualElement.ForeColorProperty, ValueResetFlags.Local);
}
}
Please provide me a solution to get rid off this problem.
Thanks,
Ravinder Singh
i use VS2022 .net8
i create a new project to try RadTreeView
ptoject file as attached
but
1. The Text of Form shown on the VS2022 IDE is so small
2. At Run Time i can not see anything in the RadTreeView
can anyone help me
thanks a lot
I have a situation where I have code that executes when the Selected Node is changed.
SelectedNodeChanged
The code in the SelectedNodeChange adds controls to some FlowLayoutPanel.
When a user clicks on a node, you can see the controls being added to the control
but the RadTreeView allows the user to select another node eventhough the SelectedNodeChange event has not finished, which
is now causing issues with the FlowLayoutPanelshowing duplicate controls.
If user waits until all controls are in the FlowLayoutPanel, and then selects another node, everything works as expected.
None of the code that adds the controls to the FlowLayoutPanel are Asynchronous.
I DO NOT have Multiselect = true.
** I have noticed that the RadTreeView acts as though it is Asynchronous when filling it. I have code that fills the nodes and you can select the nodes and see the nodes being added behind the scenes.
Maybe control is Asynchronous when changing selected nodes?

WinForms TreeView displays icons and text. How to obtain the Rectangle of the icon area, or how to implement the click event of the icon. Through the method in https://www.telerik.com/forums/hovering-over-node-image:
TreeNodeImageElement imageElement = radTreeView1.ElementTree.GetElementAtPoint(e.Location) as TreeNodeImageElement;
The obtained structure is null, and the version is 2025.
thaks
We have been using the TreeView in our software for some time now. However, recently, we noticed that it's not behaving as we have coded it. We had code that changed the Forcolor and Font when a node was selected. However, this doesn't seem to be working anymore. Attached is a sample code. Any help would be greatly appreciated.
FYI, we are using Telerik for Winforms: 2024.3.924.462
TIA
using System;
using System.Collections.Generic;
using System.Drawing;
using Telerik.WinControls;
using Telerik.WinControls.UI;
namespace TestNodeColorChange
{
public partial class RadForm1 : Telerik.WinControls.UI.RadForm
{
#region Private Fields
private string selectedNodeKey = string.Empty;
#endregion Private Fields
#region Public Constructors
public RadForm1()
{
InitializeComponent();
Load += FormLoading;
}
#endregion Public Constructors
#region Private Methods
private void FormLoading(object sender, EventArgs e)
{
List<TreeViewData> list = new List<TreeViewData>()
{
new TreeViewData { key = 1, DisplayValue = "Level 1" },
new TreeViewData { key = 2, parentKey = 1, DisplayValue = "Branch A" },
new TreeViewData { key = 3, parentKey = 1, DisplayValue = "Branch B" },
new TreeViewData { key = 4, parentKey = 1, DisplayValue = "Branch C" }
};
radTreeView1.ChildMember = "key";
radTreeView1.DisplayMember = "DisplayValue";
radTreeView1.ParentMember = "parentKey";
radTreeView1.DataSource = list;
radTreeView1.ExpandAll();
radTreeView1.SelectedNodeChanged += SelectedNodeChanged;
radTreeView1.NodeFormatting += NodeFormatting;
}
private void NodeFormatting(object sender, TreeNodeFormattingEventArgs e)
{
if (e.NodeElement is LightVisualElement lve)
{
lve.ResetValue(VisualElement.ForeColorProperty, ValueResetFlags.Local);
lve.ResetValue(VisualElement.FontProperty, ValueResetFlags.Local);
if (e.Node.Value.ToString() == selectedNodeKey)
{
lve.Font = new Font(lve.Font.FontFamily, lve.Font.Size, FontStyle.Bold);
lve.ForeColor = Color.Purple;
radTreeView1.NodeFormatting -= NodeFormatting;
radTreeView1.Refresh();
radTreeView1.NodeFormatting += NodeFormatting;
Console.WriteLine("NodeFormatting: " + selectedNodeKey);
Console.WriteLine("NodeFormatting: " + e.NodeElement.ForeColor.ToString());
Console.WriteLine("NodeFormatting: " + ((e.NodeElement.Font.Style & FontStyle.Bold) != 0));
}
}
}
private void SelectedNodeChanged(object sender, RadTreeViewEventArgs e)
{
selectedNodeKey = e.Node.Value.ToString();
Console.WriteLine("SelectedNodeChanged: " + selectedNodeKey);
radTreeView1.Nodes.Refresh();
}
#endregion Private Methods
#region Internal Classes
internal class TreeViewData
{
#region Public Properties
public string DisplayValue { get; set; }
public int key { get; set; }
public int? parentKey { get; set; }
#endregion Public Properties
}
#endregion Internal Classes
}
}
Hello,
is there any alternate available to apply specific theme directly on win form controls other than making a change in stylesheet (to apply different colors and appearance?) basically, for specific theme user wants to apply different color. one option is to create .tsp file and add it to resource. so is there any other way possible where user don't need to create. tsp or any other file and by using direct property he can achieve the same. (controls like date time picker, calendar, tree view, Rad buttons etc.)
Thank you.

Hi,
Is it possible to override the colour and width of the horizontal drag / drop visual cue? If so can you give me an example ?
Cheers
Toby

