Style problem

2 posts, 0 answers
  1. Daniel
    Daniel avatar
    1 posts
    Member since:
    Jul 2011

    Posted 18 Jul 2011 Link to this post

    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?
  2. Ivan Ivanov
    Admin
    Ivan Ivanov avatar
    1127 posts

    Posted 21 Jul 2011 Link to this post

    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!

  3. UI for WPF is Visual Studio 2017 Ready
Back to Top