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

Multiline RadTreeViewItem

3 Answers 90 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Serrin
Top achievements
Rank 1
Serrin asked on 18 Feb 2009, 10:06 PM
Hey folks!

I'm trying to figure this out, and while I can hack it, I don't want to sacrifice the theme styling of RadTreeViewItem.  So, is there any easy way to make a TreeViewItem multi-line?  I've tried setting width, but the content just stretches out and creates a scrollbar. 

Thanks!!
Serrin

3 Answers, 1 is accepted

Sort by
0
Bobi
Telerik team
answered on 20 Feb 2009, 08:20 AM
Hi Serrin,

If you want to make a TreeViewItem multi-line you can use one of these techniques:

1.The easier way to have multi-lineTreeView items is to change the header property. You can do this either with HeaderTemplate or simply:
<telerik:RadTreeView >
                <telerik:RadTreeViewItem.Header>
                    <StackPanel>
                      <TextBlock TextWrapping="Wrap" Text="Some text 1" />
                       <TextBlock  TextWrapping="Wrap" Text="Some text 2" />
                    //some other content
                    </StackPanel>
                </telerik:RadTreeViewItem.Header>
            </telerik:RadTreeViewItem>
<telerik:RadTreeView>

2.You can also set  ItemContainerStyle property the desired style and to fully customize the appearance of your treeview items. For more information please visit the following online example:
http://demos.telerik.com/silverlight/default.aspx#TreeView/Lookless

3. Another option is to use DataTemplate. For more information please check::
http://demos.telerik.com/silverlight/default.aspx#TreeView/TemplateSelector

I hope this helps.

All the best,
Boryana
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.
0
Scott Laughton
Top achievements
Rank 1
answered on 20 Mar 2009, 07:29 AM
Hi there,

The links refered to in this thread no longer work:

2.You can also set  ItemContainerStyle property the desired style and to fully customize the appearance of your treeview items. For more information please visit the following online example:
http://demos.telerik.com/silverlight/default.aspx#TreeView/Lookless

3. Another option is to use DataTemplate. For more information please check::
http://demos.telerik.com/silverlight/default.aspx#TreeView/TemplateSelector

Where can I find this information now?

Regards,

    Scott.
0
Tihomir Petkov
Telerik team
answered on 20 Mar 2009, 08:48 AM
Hello Scott,

At the time when the reply was posted the links were correct, but after our Q1 2009 release there were some changes to the demos. I apologize for any inconvenience this may have caused you.

Here are the updated links (in the same order):

http://demos.telerik.com/silverlight/default.aspx#TreeView/TemplatedNodes
http://demos.telerik.com/silverlight/default.aspx#TreeView/HierarchicalTemplate

Please let me know if you encounter any other problems.

Greetings,
Tihomir Petkov
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
Serrin
Top achievements
Rank 1
Answers by
Bobi
Telerik team
Scott Laughton
Top achievements
Rank 1
Tihomir Petkov
Telerik team
Share this question
or