は、私は次のようにそれらの両方のためのデータソースをassigne:一つのDataSource
private void MakeMeasurementUnits()
{
var units = new List<MeasurementUnit>
{
new MeasurementUnit {Name = "Current", SiUnit = "A"},
new MeasurementUnit {Name = "Voltage", SiUnit = "V"},
new MeasurementUnit {Name = "Time", SiUnit = "s"},
new MeasurementUnit {Name = "Temprature", SiUnit = "°C"}
};
lbxXunit.DataSource = units;
lbxYunit.DataSource = units;
}
奇妙なことがある(または多分それは私の最初の時間ですので! )、これらのlisboxの1つのアイテムをクリックすると、2番目のリストボックスの同じアイテムが選択されます。これはデフォルトの動作ですか?これを防ぐ方法は?これがデフォルトの動作であれば、何が役に立ちますか?
私は迅速な救済策は、2つの異なるデータソース(別の名前で同じもの)