void Editor_ImageSaving(object sender, ImageSavingEventArgs e) { for (int i = 0; i < viewModel.ModelList.Count(); i++) { if (SerializedTemplate.Name == viewModel.ModelList[i].ImageName) { var stream = editor.GetSerializedObject(); viewModel.ModelList[i].Strm = stream; } } }