Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/wpf/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用CINCH SelectedItem组合框的WPF_Wpf_Cinch - Fatal编程技术网

使用CINCH SelectedItem组合框的WPF

使用CINCH SelectedItem组合框的WPF,wpf,cinch,Wpf,Cinch,我使用的是CinchFrameworkV1。我已经公开了一个公共属性(CurrentSuppier),并将该属性绑定到组合框的selecteditem。。更新后,组合框显示不会更改为供应商的当前值。。下面是一些代码片段 /// <summary> /// Current Supplier Record /// </summary> static PropertyChangedEventArgs currentsupplierChangeArgs =

我使用的是CinchFrameworkV1。我已经公开了一个公共属性(CurrentSuppier),并将该属性绑定到组合框的selecteditem。。更新后,组合框显示不会更改为供应商的当前值。。下面是一些代码片段

/// <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);

        }
    }
//
///当前供应商记录
/// 
静态属性ChangedEventArgs currentsupplierChangeArgs=
observeHelper.CreateArgs(x=>x.CurrentSupplier);
公共供应商模型当前供应商
{
获取{return currentsupplier;}
设置
{
当前供应商=价值;
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}"  

SelectedItem和SelectedValue之间存在差异

您是否尝试改用SelectedValue