Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > TreeView > telerik: containerBindingCollection

Not answered telerik: containerBindingCollection

Feed from this thread
  • alino avatar

    Posted on Oct 22, 2010 (permalink)

    Hi,

    I want to know the equivalent mecanism in WPF to bind Property  of the TreeView and TreeViewItems with properties in the ViewModel using MVVM pattern. For Example in silverlight  I do such and work perfectly:

    <telerik:ContainerBindingCollection x:Name="BindingProperties">
       <telerik:ContainerBinding PropertyName="IsLoadOnDemandEnabled" Binding="{Binding Path=Expand, Mode=TwoWay}" />
     <telerik:ContainerBinding PropertyName="IsDropAllowed" Binding="{Binding Path=DropAllowed, Mode=TwoWay}"/>
    </telerik:ContainerBindingCollection>

    But this one doesn t work in WPF. Can U tell me how to adapt this in the WPF context??

    Thank U for your Help

    Alino

    Reply

  • Tina Stancheva Tina Stancheva admin's avatar

    Posted on Oct 22, 2010 (permalink)

    Hi alino,

    The ContainerBindingColelction is available only in Silverlight, since in WPF you can bind properties in Style. So in your case you can try this:
    <telerik:RadTreeView x:Name="radTreeView" >
        <telerik:RadTreeView.ItemContainerStyle>
            <Style TargetType="telerik:RadTreeViewItem">
                <Setter Property="IsLoadOnDemandEnabled"
                    Value="{Binding Path=Expand, Mode=TwoWay}" />
                <Setter Property="IsDropAllowed"
                    Value="{Binding Path=DropAllowed, Mode=TwoWay}" />
                    </Style>
        </telerik:RadTreeView.ItemContainerStyle>
    </telerik:RadTreeView>
    Give it a try and let us know if you need more info.

    Kind regards,
    Tina Stancheva
    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

    Reply

  • alino avatar

    Posted on Oct 27, 2010 (permalink)

    Hi Tina,

    Thank U for your Help, now it s working

    Best regards;

    Alino

    Reply

  • senthil avatar

    Posted on Feb 10, 2011 (permalink)

    Hi Tina

    I am Facing Same Problem

    Iam Using  Rad Treeview Custome control it contains style Everthing So  I could not give ItemContainerStyle in Consume Page Once I give ItemContainerStyle That will Affect my own style

    Just I drag and drop it

    Then Create a Node with Check box but Check box is not Selected

    This is our Consume Page Xaml

    <local:

    TreeView x:Name="RadTreeView1" ToolTip="Enter Name" Height="500" Width="300" ItemsOptionListType="CheckList" IsOptionElementsEnabled="True" > </local:TreeView>

    Please help me

    Regards
    SenthilNathan.S

    Reply

  • Tina Stancheva Tina Stancheva admin's avatar

    Posted on Feb 10, 2011 (permalink)

    Hi senthil,

    I am not sure how exactly your local:TreeView control is defined and therefore I cannot be sure what is causing you issue but if the RadTreeView is databound, basically you can bind the CheckState property of the RadTreeViewItem using a StyleBinding, like explained here.

    Since the ItemContainerStyle property defines a style for the RadTreeViewItems of a databound RadTreeView, you need to set this proeprty to a style with target type RadTreeViewItem. And if you have already defined such a style, for example RadTreeViewItemStyle, you can set the ItemContainerStyle to: ItemContainerStyle={StaticResource RadTreeViewItemStyle} and modify the RadTreeViewItemStyle to define a binding for the CheckState property of the items.

    I hope this info will help you. Let us know if we can further assist you.

    Best wishes,
    Tina Stancheva
    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>

    Reply

  • Mike avatar

    Posted on Aug 16, 2011 (permalink)

    I’m working with RadTileView and using RadFluidContentControl to handle three different templates based 
    on the TileViewItem state. The solution is C# WPF MVVM Prism.
    I have looked at 279380_Example solution you provided for MVVM which is using Silverlight  
    Telerik ContainerBindingCollection  which does not work in WPF.
     
    Is there any sample project that show this functionality in WPF? I’m looking to do something similar 
    to the TileView Demo with the flags where in the minimized template I have a short description but
    when a TileViewItem is maximized display a detailed information.
     
    Thank you. 

    Reply

  • Zarko Zarko admin's avatar

    Posted on Aug 19, 2011 (permalink)

    Hi Mike,
    Could you please examine the attached project and if you have more questions feel free to ask?

    Greetings,
    Zarko
    the Telerik team

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

    Reply

  • Michael Gaigg avatar

    Posted on Nov 21, 2011 (permalink)

    you probably want to update the WPF sample code that you ship with Q3

    in FirstLook example.xaml of treeview

            <Style TargetType="telerik:RadTreeViewItem">
                <Setter Property="FontWeight" Value="Normal" />
                <Setter Property="IsExpanded" Value="{Binding IsActive}" />
                <Setter Property="IsSelected" Value="{Binding IsActive}" />
            </Style>

    isExpanded and IsSelected are missing - still having the containerBindingCollection in there (the online sample is ok)

    Reply

  • Tina Stancheva Tina Stancheva admin's avatar

    Posted on Nov 22, 2011 (permalink)

    Hello Michael,

    Thank you for bringing this issue to our attention. We will remove the ContainerBinding definitions from the WPF solution.

    I updated your Telerik account for this report.

    Best wishes,
    Tina Stancheva
    the Telerik team

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

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > TreeView > telerik: containerBindingCollection
Related resources for "telerik: containerBindingCollection"

WPF TreeView Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  ]