private void UpdateView(object newValue) { if(newValue == null) { Content = null; } else if(newValue is AdapterLib.MockBulbDevice) { Content = new LightBulbView() { DataContext = newValue }; } else if(newValue is AdapterLib.MockCurrentTemperatureDevice) { Content = new TemperatureView() { Device = newValue as AdapterLib.MockCurrentTemperatureDevice }; } else if (newValue is AdapterLib.MockCurrentHumidityDevice) { Content = new HumidityView() { Device = newValue as AdapterLib.MockCurrentHumidityDevice }; } else if (newValue is AdapterLib.MockOnOffSwitchDevice) { Content = new SwitchView() { Device = newValue as AdapterLib.MockOnOffSwitchDevice }; } }