public void InsertPart(XmlParts type)
        {
            // Check if the part does not exist yet
            var part = this.document.RetrieveCustomPart(type);

            if (part != null)
            {
                return;
            }

            part = this.document.CreateCustomPart(type);
            var partModel = new OfficePartViewModel(part, this);

            this.Children.Add(partModel);
            partModel.IsSelected = true;
        }
Exemple #2
0
 public IconViewModel(string id, string filePath, OfficePartViewModel parent)
     : this(id, LoadImageFromPath(filePath), parent)
 {
 }
Exemple #3
0
 public IconViewModel(string id, BitmapImage image, OfficePartViewModel parent)
     : base(parent, false, false)
 {
     this.Image = image;
     this.id    = id;
 }