public HeatmapViewModel(HeatmapPlotValue value) { _value = value; _title = value[0].Label; _colorPalette = value.ColorPalette; _save = new RelayCommand(x => { var window = x as Window; _value.ColorPalette = _colorPalette; _value[0].Label = _title; _value.UpdateProperties(); if (window != null) { window.Close(); } }); }