的内容我在资源数据模板的TextBlock:绑定的TextBlock中的DataTemplate(资源),以检查单选按钮
<DataTemplate x:Key="MyDataTemplate" ItemsSource="{Binding MySource}">
<TextBlock x:Name="MyText" Text="{Binding ???}" />
</DataTemplate>
,我想与检查单选按钮的Content
绑定:
<RadioButton GroupName="MyGroup" Content="Code" />
<RadioButton GroupName="MyGroup" Content="Description" />
如果选择代码单选按钮,那么我希望文本变成Text={Binding Code}
。
请帮忙,谢谢。
它没有工作,周杰伦。 MyText已被更改并通知,但我的TreeView没有显示绑定文本(空白)。 – 2010-07-22 03:23:32
什么'TreeView'? – Jay 2010-07-22 04:04:54
我的RadTreeView使用MyDataTemplate作为它的ItemTemplate。 – 2010-07-29 09:08:24