私のメイン ウィンドウ xaml には、2 つのユーザー コントロールと 2 つRadioButton
の があります。RadioButton
sVisibility
でユーザー コントロールの を制御したい。
xaml の抜粋:
<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>
ユーザーコントロールには、次のようなものがあります。
Visibility="{Binding IsChecked,
Converter={StaticResource BooleanToVisibilityConverter},
ElementName=Window1.radioButton_Tree}" >
実行時に次のエラーが発生します。
Cannot find source for binding with reference 'ElementName=Window1.radioButton_Tab'
私は何を見落としていますか?