Hello,
In my main window xaml I have two user controls and two radiobuttons. I want the radiobuttons to control the visibility of the user controls.
xaml excerpt:
<WpfApp2:ViewTree/>
<WpfApp2:ViewTab/>
<RadioButton x:Name="radioButton_Tree" GroupName="View"
IsChecked="True"> Tree View </RadioButton>
<RadioButton x:Name="radioButton_Tab" GroupName="View"
IsChecked="False" >Tab View</RadioButton>
in the user controls, I have something like this:
Visibility="{Binding IsChecked,
Converter={StaticResource BooleanToVisibilityConverter},
ElementName=Window1.radioButton_Tree}" >
At run time I get this error:
Cannot find source for binding with reference 'ElementName=Window1.radioButton_Tab'
What am I overlooking?
Thanks.