Click here to Skip to main content
15,922,166 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

The following snippet is extracted from ABCProduct.xaml, for WPF Application.

<GroupBox Header="NewType" name="Typ1" Grid.Row="2" BorderBrush="Gray" BorderThickness="1">
<CheckBox Name="ProductCheckBox">Prod.CheckBox</CheckBox>
</GroupBox>
<GroupBox Header="SWG_ProductType" name=<b>"{BindingElementName=Typ1,Path =IsChecked}"></b> Grid.Row="3" ...>
......
......other Controls <!-<<viz., Radio Buttons etc., -->
......
</GroupBox>

"The Error is "BindingElementName" was not found. To verify missing assembly reference" etc.,



The work around for Binding the Group Box controls using "Binding Element Name for Check box and Path= IsChecked is giving error in XAML parser, could you suggest how could we implement the same.



ie., How can we disable or enable the Group Box <<SWG_ProductType>> entities based on Check box State.

Thanks in Advance...

With Regards,
Samanth
Posted
Updated 15-Feb-12 17:26pm
v4

1 solution

You have 2 mistakes:



  1. You forgot to put a space between Binding and ElementName.
  2. You used the Name property instead of the IsEnabled property.

You can change the definition of your GroupBox to something like the following:


XML
<GroupBox Header="SWG_ProductType" IsEnabled="{Binding ElementName=Typ1, Path =IsChecked}" Grid.Row="3" ...>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900