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

Treeview in combobox

1 Answer 43 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Edward
Top achievements
Rank 1
Edward asked on 29 Jul 2010, 09:52 PM
I am sure you have answered this question before.  But I have seen several solutions.  Can you please indicate what is a preferred way of placing a RadTreeView into a RadComboBox?  Also, I have read here and there that RadComboBox has leaks and a TreeView Control in a ComboBox has memoery leaks as well?  Is this true?


e

1 Answer, 1 is accepted

Sort by
0
Valeri Hristov
Telerik team
answered on 02 Aug 2010, 09:16 AM
Hello Edward,

In Silverlight 4 everything more complex than a button leaks :) One of the reasons for that is the usage of ContentControl inside other controls. Unfortunately such control nesting is needed, because the Silverlight ContentPresenter does not have a Foreground property, hence in order to change the text Foreground color in visual states we have to use ContentControl. This is a known problem in Silverlight 4 and unfortunately there are no workarounds and we cannot do much to fix it. As far as I know Microsoft is working on a updated version of Silverlight, that will resolve the memory leak problems, but I cannot say when it will be available for download.

Regarding the TreeView in a ComboBox - there are many ways to do it, but I would prefer "TreeView in a DropDownButton":
http://blogs.telerik.com/valerihristov/posts/10-05-12/treeview_in_combobox_with_radcontrols_for_silverlight_or_wpf_final_take.aspx

This approach is much simpler than the others that I've described in the past - you do not mess with control templates, there are no attached behaviors, etc., hence there is less room for errors.

Sincerely yours,
Valeri Hristov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
ComboBox
Asked by
Edward
Top achievements
Rank 1
Answers by
Valeri Hristov
Telerik team
Share this question
or