使用silverlight 4,我已经将标签的目标设置为组合框。组合框有两个绑定集,它使用错误的绑定来获取标签的内容。
我知道我应该使用标签的PropertyPath属性来告诉它要使用什么绑定,但是我找不到用什么作为值的例子。我的本能是使用组合框的属性的名称,但这似乎行不通。
删除第二个绑定将有效,但我需要这两个绑定。有人能帮我吗?
[Display(Name = "Manufacturer"))]
public List<dms_Manufacturer> ManufacturerList {get;set;}
<sdk:Label Grid.Row ="4" Grid.Column="0"
Target="{Binding ElementName=cmb_Manufacturer}"
PropertyPath="ItemsSource" />
<ComboBox Grid.Row ="4" Grid.Column="2" x:Name="cmb_Manufacturer"
ItemsSource="{Binding ManufacturerList}"
DisplayMemberPath="Name"
SelectedItem="{Binding dms_Manufacturer, Mode=TwoWay}"
SelectionChanged="cmb_Manufacturer_SelectionChanged" />发布于 2011-06-29 12:58:05
尝试:
<sdk:Label Grid.Row ="4" Grid.Column="0"
Target="{Binding ElementName=cmb_Manufacturer}"
PropertyPath="ManufacturerList" /> https://stackoverflow.com/questions/6510425
复制相似问题