public MainWindow() { InitializeComponent(); plc = new PLC(PLC_AMSNETID); model = plc.Class <ViewModel>(); model.Temp.ValueChanged += Temp_ValueChanged; DataContext = model; }