DataTemplateSelector (and other *Selector) no longer DependencyObject?

6 posts, 0 answers
  1. gk
    gk avatar
    24 posts
    Member since:
    Jul 2010

    Posted 20 Oct 2011 Link to this post

    in Q3 2011 Beta, Telerik.Windows.Controls.DataTemplateSelector (and other *Selectors) no longer inherit DependencyObject (System.Windows)?
    I noticed this in in the internal builds after Q2 2011.9.20 too, they now just inherit Object.

    Is this an oversight or intended?
    Thanks, GK
  2. Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 21 Oct 2011 Link to this post

    Hi Gk,

    This change is intended because the DependencyObject base class lead to problems that have no other workarounds. I can provide more information if you are interested...

    Greetings,
    Valeri Hristov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. DevCraft banner
  4. Brian Sayatovic
    Brian Sayatovic avatar
    91 posts
    Member since:
    Nov 2009

    Posted 25 Jan 2012 Link to this post

    I just tried upgrading and got bit by this same problem.  Can I have the same details?  Do you have any suggested work-arounds?
  5. Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 27 Jan 2012 Link to this post

    When we made the *Selector clases DO we started receiving XAML parser exceptions in our themes. It is possible to reproduce the problem in a very simple application with no Telerik control inside, which made us think that it is caused by a bug in the Silverlight runtime. We were unable to find a workaround, hence we had to revert to simple objects. In addition, the WPF *Selector classes are plain objects, hence the code in the two platforms would have been different, which something we want to avoid.

    Kind regards,
    Valeri Hristov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  6. Eugene
    Eugene avatar
    1 posts
    Member since:
    Oct 2010

    Posted 30 Oct 2012 Link to this post

    We used to use dependency properties in the selector to give the selector extra context. Is there a way we can continue with using dependency properties in the selector?
  7. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 02 Nov 2012 Link to this post

    Hello Eugene,

    As the StyleSelector doesn't inherit from the DependencyObject class it cannot have any DependencyProperties and you can add only simple CLR properties to it. Sorry for the inconvenience caused.

    Regards,
    Miroslav Nedyalkov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top
DevCraft banner