WPF使用cinch selectionItem combobox
题
我正在使用Cinch Framework V1。我已经暴露了一个公共财产(CurrentSuppier),并将该属性粘合到我组合框的SelectedItem。更新后,ComboBox显示器不会更改为供应商的当前值。.以下是一些代码片段。
/// <summary>
/// Current Supplier Record
/// </summary>
static PropertyChangedEventArgs currentsupplierChangeArgs =
ObservableHelper.CreateArgs<IncomingViewModel>(x => x.CurrentSupplier);
public SupplierModel CurrentSupplier
{
get { return currentsupplier ; }
set
{
currentsupplier = value;
NotifyPropertyChanged(currentsupplierChangeArgs);
}
}
XAML代码:
<ComboBox Margin="345,8,542,0" Name="cbosupplier" Height="23" VerticalAlignment="Top"
VerticalContentAlignment="Center"
ItemTemplate="{StaticResource SupplierTemplate}"
ItemsSource="{Binding Path=ListofSupplier}"
Grid.ColumnSpan="3" Grid.RowSpan="2"
SelectedItem="{Binding Path=CurrentSupplier ,Mode = TwoWay}"
我尝试将CurrentUpplier绑定到文本框,只是为了查看绑定是否有效。.它确实如此。。文本框随我的CurrentUpplier属性的当前值而更新。但是它在ComboBox上无法使用。
没有正确的解决方案
其他提示
SelectedItem和Selected Value之间存在差异。
您是否尝试使用选定的Value?
不隶属于 StackOverflow