public IconViewModel(string id, BitmapImage image, OfficePartViewModel parent)
     : base(parent, false, false)
 {
     this.Image = image;
     this.id    = id;
     this.newId = id;
 }
Exemple #2
0
        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;
            this.partsAddedOrRemoved = true;
        }
 public IconViewModel(string id, string filePath, OfficePartViewModel parent)
     : this(id, LoadImageFromPath(filePath), parent)
 {
 }