Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > Expander > Binding to IsChecked property of checkbox

Not answered Binding to IsChecked property of checkbox

Feed from this thread
  • Deepak Shakya avatar

    Posted on Oct 18, 2011 (permalink)

    Hi,

    • I have bound the IsExpanded property of the expander to the IsChecked property of the checkbox usign Element property binding in Blend.
    • When it starts, it works fine. i.e. when I check the box, it expands and collapses when checked off.
    • But then I Collapse the box manually. The binding is now broken. Checking the checkbox or checking is off has no effect on expand/collapse of the expander. I am using one-way binding. I cannot use two-way binding as I do not want to check off the checkbox when the expander collapses.

    Any help is appreciated.

    Cheers.

    Reply

  • Petar Mladenov Petar Mladenov admin's avatar

    Posted on Oct 20, 2011 (permalink)

    Hello Deepak Shakya,

     This is not a problem of the RadExpander, it's just the way the Binding works. Once you expand the Expander programmatically, the one way binding won't work. You can examine the same behavior with 2 CheckBoxes:

    <CheckBox x:Name="cBox1" Content="chB1" IsChecked="{Binding ElementName=cBox,Path=IsChecked}" />
     
                <CheckBox x:Name="cBox" Content="CHeckBox" />
    So you need a custom check/uncheck cinchonization that cannot be done with Bindings only. You need to use Checked/Uncheck events ( Expanded/Collapsed of the Expander) in order to achieve the desired functionality.Best wishes,
    Petar Mladenov
    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 / Silverlight > Expander > Binding to IsChecked property of checkbox
Related resources for "Binding to IsChecked property of checkbox"

Silverlight Expander Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  ]