This question is locked. New answers and comments are not allowed.
Alex Olenev
Top achievements
Rank 1
Alex Olenev
asked on 12 Sep 2011, 04:29 PM
Hi
If I want to put in one RadTreeView another RadTreeView instead of RadTreeViewItem (TreeView in TreeView). With MouseOver this nested TreeView Highlighted with Yellow color. But I don't want this yellow background. How can I get it with tranparent background (the parent TreeViewItem style hasn't yellow background)?
P.S.
The source of this problem: needed Drag&Drop in TreeView but not in hole treeview - only for the part of it (for one section)
If I want to put in one RadTreeView another RadTreeView instead of RadTreeViewItem (TreeView in TreeView). With MouseOver this nested TreeView Highlighted with Yellow color. But I don't want this yellow background. How can I get it with tranparent background (the parent TreeViewItem style hasn't yellow background)?
P.S.
The source of this problem: needed Drag&Drop in TreeView but not in hole treeview - only for the part of it (for one section)
4 Answers, 1 is accepted
0
Accepted
Hello Alex Olenev,
I edited the default Style of the RadtreeViewItem and used it as an ItemContainerStyle of the TreeItem that holds the inner RadTreeView. Please keep in mind here that everything that is placed in the XAML body of a RadtreeViewItem then gets wrapped in a RadTreeViewItem too.
The Style change that I made was to comment the MouseOver VisualState:
Please let us know if this satisfies you or not.We would be glad to help you further.
Regards,
Petar Mladenov
the Telerik team
I prepared a sample for you.Basically I have the following RadTreeView declaration:
<
telerik:RadTreeView
>
<
telerik:RadTreeViewItem
Header
=
"Item A"
/>
<
telerik:RadTreeViewItem
Header
=
"Item B"
/>
<
telerik:RadTreeViewItem
Header
=
"Item Containing TreeView"
ItemContainerStyle
=
"{StaticResource RadTreeViewItemStyle1}"
>
<
telerik:RadTreeView
x:Name
=
"innerTreeView"
Background
=
"DeepSkyBlue"
>
<
telerik:RadTreeViewItem
Header
=
"Inner TreeItem 1"
/>
<
telerik:RadTreeViewItem
Header
=
"Inner TreeItem 2"
/>
<
telerik:RadTreeViewItem
Header
=
"Inner TreeItem 3"
/>
</
telerik:RadTreeView
>
</
telerik:RadTreeViewItem
>
</
telerik:RadTreeView
>
The Style change that I made was to comment the MouseOver VisualState:
<
ControlTemplate
x:Key
=
"TreeViewItemDefaultTemplate"
TargetType
=
"telerik:RadTreeViewItem"
>
<
Grid
x:Name
=
"RootElement"
>
.....
<
VisualStateManager.VisualStateGroups
>
............
<
VisualStateGroup
x:Name
=
"CommonStates"
>
......
<!--<
VisualState
x:Name
=
"MouseOver"
>
<
Storyboard
>
<
DoubleAnimation
Duration
=
"0:0:0.1"
To
=
"1"
Storyboard.TargetProperty
=
"Opacity"
Storyboard.TargetName
=
"MouseOverVisual"
/>
</
Storyboard
>
</
VisualState
>-->
Regards,
Petar Mladenov
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Alex Olenev
Top achievements
Rank 1
answered on 16 Sep 2011, 08:22 AM
Thank you very much. It's very usefull for me
0
Aarsh
Top achievements
Rank 1
answered on 19 Jul 2012, 04:00 PM
Perfect, and would you please demonstrate the same for asp.net Ajax, I meant the .aspx page ?
Thanks in advacne,
-Aarsh
Thanks in advacne,
-Aarsh
0
Aarsh
Top achievements
Rank 1
answered on 20 Jul 2012, 02:01 PM
Thanks Princy, the scenario I requested above is being answered at the following "permlink"
http://www.telerik.com/community/forums/aspnet-ajax/treeview/nesting-treeview-programatically.aspx#2194882
Thanks,
-Aarsh
http://www.telerik.com/community/forums/aspnet-ajax/treeview/nesting-treeview-programatically.aspx#2194882
Thanks,
-Aarsh