/// <summary>
        /// Adds a new SerializationClass view model for the given element.
        /// </summary>
        /// <param name="element">ModelContext.</param>
        public void AddChild(SerializationClass element)
        {
            if (!(element is SerializedDomainClass))
            {
                return;
            }

            SerializedDomainClass dc = element as SerializedDomainClass;

            /*if (dc.ParentEmbeddedElements.Count > 0)
             *  return;*/

            // verify that node hasnt been added yet
            foreach (SerializedDomainModelViewModel viewModel in this.allVMs)
            {
                if (viewModel.SerializationElement.Id == element.Id)
                {
                    return;
                }
            }

            SerializedDomainModelViewModel vm = new SerializedDomainModelViewModel(this.ViewModelStore, dc);

            this.allVMs.Add(vm);

            IOrderedEnumerable <SerializedDomainModelViewModel> items = null;

            items = this.allVMs.OrderBy <SerializedDomainModelViewModel, string>((x) => (x.DomainElementName));

            ObservableCollection <SerializedDomainModelViewModel> temp = new ObservableCollection <SerializedDomainModelViewModel>();

            foreach (SerializedDomainModelViewModel item in items)
            {
                temp.Add(item);
            }

            this.allVMs = temp;

            OnPropertyChanged("AllVMs");
        }
        /// <summary>
        /// Adds a new SerializationClass view model for the given element.
        /// </summary>
        /// <param name="element">ModelContext.</param>
        public void AddChild(SerializationClass element)
        {
            if (!(element is SerializedDomainClass))
                return;

            SerializedDomainClass dc = element as SerializedDomainClass;
            /*if (dc.ParentEmbeddedElements.Count > 0)
                return;*/

            // verify that node hasnt been added yet
            foreach (SerializedDomainModelViewModel viewModel in this.allVMs)
                if (viewModel.SerializationElement.Id == element.Id)
                    return;

            SerializedDomainModelViewModel vm = new SerializedDomainModelViewModel(this.ViewModelStore, dc);
            this.allVMs.Add(vm);

            IOrderedEnumerable<SerializedDomainModelViewModel> items = null;
            items = this.allVMs.OrderBy<SerializedDomainModelViewModel, string>((x) => (x.DomainElementName));

            ObservableCollection<SerializedDomainModelViewModel> temp = new ObservableCollection<SerializedDomainModelViewModel>();
            foreach (SerializedDomainModelViewModel item in items)
                temp.Add(item);

            this.allVMs = temp;

            OnPropertyChanged("AllVMs");
        }