This question is locked. New answers and comments are not allowed.
Good Day,
I want to convert my treeview to a Radtreeview, hence some events are not found in radtreeview.
From a treeview: SelectionItemChanged
private void treeView_SelectionItemChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
{
Tuple<Span, Span, Telerik.Windows.Controls.RadTreeViewItem> range = mapping[(XNode)((Telerik.Windows.Controls.RadTreeViewItem)e.NewValue).Tag];
bool colorize = false;
foreach (Span span in richTextBox.Document.EnumerateChildrenOfType<Span>())
{
if (span == range.Item1)
{
colorize = true;
}
span.HighlightColor = colorize ? Colors.Yellow : Colors.Transparent;
if (span == range.Item2)
{
colorize = false;
}
}
richTextBox.UpdateEditorLayout();
}
in RadTreeView it will generate like this:
private void treeView_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangedEventArgs e)
{
}
I want it also to happen in my radtreeview. Since the Radtreeview SelectionChanged event does not match with the second parameter with the treeview. How will i do it in radtreeview?
I want to convert my treeview to a Radtreeview, hence some events are not found in radtreeview.
From a treeview: SelectionItemChanged
private void treeView_SelectionItemChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
{
Tuple<Span, Span, Telerik.Windows.Controls.RadTreeViewItem> range = mapping[(XNode)((Telerik.Windows.Controls.RadTreeViewItem)e.NewValue).Tag];
bool colorize = false;
foreach (Span span in richTextBox.Document.EnumerateChildrenOfType<Span>())
{
if (span == range.Item1)
{
colorize = true;
}
span.HighlightColor = colorize ? Colors.Yellow : Colors.Transparent;
if (span == range.Item2)
{
colorize = false;
}
}
richTextBox.UpdateEditorLayout();
}
in RadTreeView it will generate like this:
private void treeView_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangedEventArgs e)
{
}
I want it also to happen in my radtreeview. Since the Radtreeview SelectionChanged event does not match with the second parameter with the treeview. How will i do it in radtreeview?