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

[Solved] Theme doesn't work and some DnD questions

1 Answer 104 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Gabriele Eigel
Top achievements
Rank 1
Gabriele Eigel asked on 19 Jun 2009, 12:37 PM
Hi, I have some problems and questions regarding the RadTreeView and I hope someone can help me. Thanks in advance.

1. Themes
I've get the new Telerik binaries and now there are 3 possible Themes. I've tried to assign the "Summer" theme to a RadTreeView (with drag and drop capability inside the tree declared through IsDragDropEnable="True" and drop capability from a list box), but the result ist not the expected... The drag cue is blue and the line to designate the position to drop in tree is blue too, but the selected tree item is orange (like in the default theme Outlook Black).

Have I made something wrong or is a bug?  (the project has a reference on the .....Themes.Summer.dll)

2. There are 2 posibilities to implement drag and drop in a tree view- 
         type a. one inside a tree with IsDragDropEnable="True" and  
         type b. between another control and a tree ( using RadDragAndDropManager)

I have a tree with data binding through ItemTemplate, but on DnD inside the tree (type a)  the drag cue is an object  - the object behind the data template :-(. How can I set it explicit on the data template?

Is there a possiblity to have the lines to designate where I drop in DnD between controls (type b) too?

Thanks for reply,
   Gabriele


The Tree declaration

 

<telerikNavigation:RadTreeView x:Name="treeHierarchy" IsDragDropEnabled="True" telerik:StyleManager.Theme="Summer" Width="Auto" Height="Auto" Background="White" 
                        ItemTemplate="{StaticResource DataItems}" IsLineEnabled="True"  IsEditable="False" ItemPrepared="treeHierarchy_ItemPrepared">                          
                        <telerikNavigation:RadTreeView.ItemContainerStyle>  
                            <Style TargetType="telerikNavigation:RadTreeViewItem">  
                                <Setter Property="DragDrop:RadDragAndDropManager.AllowDrop" Value="True" />  
                            </Style>  
                        </telerikNavigation:RadTreeView.ItemContainerStyle>  
                        <telerikNavigation:RadContextMenu.ContextMenu>  
                            <telerikNavigation:RadContextMenu x:Name="ContextMenu">  
                                <telerikNavigation:RadMenuItem Header="Cut" />  
                                <telerikNavigation:RadMenuItem Header="Copy" />  
                                <telerikNavigation:RadMenuItem Header="Paste" />  
                            </telerikNavigation:RadContextMenu>  
                        </telerikNavigation:RadContextMenu.ContextMenu>  
                    </telerikNavigation:RadTreeView> 
<UserControl.Resources>  
        <telerik:HierarchicalDataTemplate x:Key="DataItems" ItemsSource="{Binding Children}">  
            <TextBlock Text="{Binding Text}"/>  
        </telerik:HierarchicalDataTemplate>  
    </UserControl.Resources> 

I've tried to localize the reason for getting a wrong selected item color for used theme. It has something with the usage of the RadTreeView.ItemContainerStyle. If I don't use it then the color of selected item in tree is correct. A DragDrop:RadDragAndDropManager.AllowDrop="True" declaration in telerikNavigation:RadTreeView  node hasn't the same effect (I can't drop items in the tree view). What's wrong?

1 Answer, 1 is accepted

Sort by
0
Kiril Stanoev
Telerik team
answered on 24 Jun 2009, 01:03 PM
Hello Gabriele,

Both of your questions are excellent and indeed we have issues with those two topics (themes and drag&drop).
However, everything will be fixed for our Q2 release and an example will be available.
Currently RadTreeView was using its internal DnD implementation, while now it will use the DnD manager.
If you have further questions, let us know and stay tuned for updates

Sincerely yours,
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.
Tags
TreeView
Asked by
Gabriele Eigel
Top achievements
Rank 1
Answers by
Kiril Stanoev
Telerik team
Share this question
or