/// <summary> /// Función que permite agregar una relación al DataModelDocumentWpf. /// </summary> /// <param name="newRelation">Relación a ser agregada.</param> public void AddRelation(RelationWpf newRelation) { if (newRelation == null) { throw new ArgumentNullException("newRelation", "newRelation can not be null"); } newRelation.ContextMenuDeleteClick += new RoutedEventHandler(newRelation_ContextMenuDeleteClick); MyDataModel.AddRelation(newRelation); }