ContainerBindingCollection in WPF

2 posts, 1 answers
  1. Ben Boger
    Ben Boger avatar
    19 posts
    Member since:
    May 2010

    Posted 25 Feb 2011 Link to this post

    I am trying to get a CountainerBindingCollection and ContainBinding to work with my hierarchical data template in wpf but no matter what namespace I use it doesn't seem to recognize it.

    This link is to one of your WPF pages showing the ContainerBinding being used and it seems to be in the same namespace as the RadMenu , I have Access to the Menu but not the ContainerBindings, is this page of information wrong?

    http://www.telerik.com/help/wpf/radmenu-how-to-enable-disable-menu-items.html

    At the bottom of this page there is a link 'to learn more about container bindings' which leads to a page that never even mentions the containerbinding
  2. Answer
    Hristo
    Admin
    Hristo avatar
    832 posts

    Posted 25 Feb 2011 Link to this post

    Hi Ben Boger,

    ContainerBindnigs are only available for Silverlight. Their purpose is to workaround the missing Bindings in Style Setter. So you don't need them in WPF.
    If you want to enable/disable RadMenuItems you could use ItemContainerStyle property and set the following setter:
    <Style TargetType="telerik:RadMenuIte">
       <Setter Property="IsEnabled" Value="{Binding IsMenuItemEnabled}" />
    </Style>

    Where IsMenuItemEnabled is a property on your data item.

    We will update this article. Thanks for pointing it out.

    Kind regards,
    Hristo
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top