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

Style problem

1 Answer 25 Views
TreeListView
This is a migrated thread and some comments may be shown as answers.
Daniel
Top achievements
Rank 1
Daniel asked on 18 Jul 2011, 04:20 PM
Hi!

I have some problem with applying a style on a custom control derived from RadTreeListView.
This is the base style that works correctly on original RadTreeListView:
<Style TargetType="{x:Type telerik:RadTreeListView}" x:Key="IprRadTreeListViewStyle" BasedOn="{StaticResource IPRBaseStyle}">
        <Setter Property="ValidatesOnDataErrors" Value="None"/>
        <Setter Property="telerik:StyleManager.Theme" Value="Summer"/>
</Style>

I create another style based on the previous style:
<Style TargetType="{x:Type controls:IPRRadTreeListView}" BasedOn="{StaticResource IprRadTreeListViewStyle}">
</Style>

The CS code of my custom control:
class IPRRadTreeListView : RadTreeListView
    {
        static IPRRadTreeListView()
        {
            DefaultStyleKeyProperty.OverrideMetadata(typeof(IPRRadTreeListView), new FrameworkPropertyMetadata(typeof(RadTreeListView)));
        }
         
        public IPRRadTreeListView() : base()
        {   
           ...
        }
 
        ...
    }

If I run the application then my IPRRadTreeListView control doesn't become visible. I tried to apply the style explicitly ( Style = {StaticResource IprRadTreeListViewStyle} ) on my control but I had the same result: IPRRadTreeListView wasn't visible.

This scenario works correctly for IPRRadGridView (derived from RadGridView).

Could anbody help me, please?

1 Answer, 1 is accepted

Sort by
0
Ivan Ivanov
Telerik team
answered on 21 Jul 2011, 03:47 PM
Hi Daniel,

There appears to be such an issue with RadTreeListView. I have logged it in our bug tracking system. It will be fixed in some future release of RadControls. Thank you.

Regards,
Ivan Ivanov
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
TreeListView
Asked by
Daniel
Top achievements
Rank 1
Answers by
Ivan Ivanov
Telerik team
Share this question
or