我有一个如下所示的DataTemplate中的comboBox:
<ComboBox x:Name="cboImages" Grid.Row="1" Grid.Column="1" SelectedItem="{Binding XPath=ImageName, Path=SelectedItem.Content, Mode=TwoWay}" IsSynchronizedWithCurrentItem="True" >
<ComboBoxItem>Image1.jpg</ComboBoxItem>
<ComboBoxItem>Image2.jpg</ComboBoxItem>
<ComboBoxItem>Image3.jpg</ComboBoxItem>
</ComboBox>
我想要实现的是使用下拉框的
SelectedItem
来更新XML数据源的属性(ImageName)。以上代码有什么问题吗?
谢谢。