Пример #1
0
 public IconViewModel(string name, BitmapImage image, OfficePartViewModel parent)
     : base(parent, false, false)
 {
     this.Image   = image;
     this.name    = name;
     this.newName = name;
 }
Пример #2
0
        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;
        }
Пример #3
0
 public IconViewModel(string name, string filePath, OfficePartViewModel parent)
     : this(name, LoadImageFromPath(filePath), parent)
 {
 }