以下代码在WPF中正常工作。为什么Path = SelectedItem.Content适用于WPF中的组合框但不适用于Silverlight?
在Silverlight它给我的错误**无效属性值{Binding ElementName = WhichNumber,Path = SelectedItem.Content}属性文本。 **
我怎样才能得到这个在Silverlight?
<ComboBox x:Name="WhichNumber" Width="100" HorizontalAlignment="Left" Margin="10" SelectedIndex="0">
<ComboBoxItem Content="One"/>
<ComboBoxItem Content="Two"/>
<ComboBoxItem Content="Three"/>
</ComboBox>
<TextBlock Text="{Binding ElementName=WhichNumber, Path=SelectedItem.Content}"/>
你想在Silverlight 2或Silverlight 3(它有元素到元素的绑定)做到这一点? – 2009-06-11 02:29:37
在2,哦,这是很好的知道! – 2009-06-11 06:25:48