public void AddObject(string ModelName, string type = "") { EngineObject n_obj; if (type == "") { n_obj = _engineObject.AddObject(ModelName); } else { n_obj = _engineObject.AddObject(ModelName, type); } var e_obj = new EngineObjectViewModel(n_obj, this); _children.Add(e_obj); this.IsExpanded = true; e_obj.IsSelected = true; }