Cinch selectedItemコンボボックスを使用したWPF
質問
Cinch Framework v1を使用しています。公共の財産(Curlentsuppier)を公開し、そのプロパティをコンボボックスの選択項目にバインドしました。更新した後、コンボボックスディスプレイはサプライヤーの現在の値に変更されません。以下はコードスニペットです。
/// <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}"
バインドが機能するかどうかを確認するために、Curlentsupplierをテキストボックスにバインドしてみました。
正しい解決策はありません
他のヒント
SelectedItemとselectedValueには違いがあります。
代わりにSelectedValueを使用しようとしましたか?
所属していません StackOverflow