Здравствуйте, подскажите пожалуйста как правильно получить Binding'ом данные из
public class Street
{
public Street(string _Name, int _CarsVolume, int _CarsIn, int _CarsOut, int _Norma)
{
this.Name = _Name;
this.CarsVolume = _CarsVolume;
this.CarsIn = _CarsIn;
this.CarsOut = _CarsOut;
this.Norma = _Norma;
Color color;
}
public string Name { get; set; }
public int CarsVolume {get {return CarsVolume;} set {if (CarsVolume > 50) this.color = Colors.Red; else this.color = Colors.Green; } }
public int CarsIn { get; set; }
public int CarsOut { get; set; }
public int Norma { get; set; }
public Color color { get; set; }
}
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
Street[] streets =
{
new Street("Moskovskiy prospect", 500, 30, 40, 400)
};}}