public IconViewModel(string name, BitmapImage image, OfficePartViewModel parent) : base(parent, false, false) { this.Image = image; this.name = name; this.newName = name; }
public void InsertPart(XmlPart 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 name, string filePath, OfficePartViewModel parent) : this(name, LoadImageFromPath(filePath), parent) { }