public AttributeTextBox(Property property, IControlsAttributes classController) { this.property = property; this.classController = classController; #region property context menu this.ContextMenu = new ContextMenu(); ContextMenuItem remove = new ContextMenuItem("Remove attribute"); remove.Icon = ContextMenuIcon.GetContextIcon("delete2"); remove.Click += delegate { classController.RemoveAttribute(property); }; this.ContextMenu.Items.Add(remove); ContextMenuItem change = new ContextMenuItem("Properties..."); change.Icon = ContextMenuIcon.GetContextIcon("pencil"); change.Click += delegate { classController.ShowAttributeDialog(property); }; this.ContextMenu.Items.Add(change); #endregion property.PropertyChanged += OnPropertyChangedEvent; MouseDoubleClick += OnMouseDoubleClick; RefreshTextContent(); BindType(); }
public AttributeDialog(Property attribute, IControlsAttributes pimClassController, ModelController controller) : this(attribute, controller) { this.pimClassController = pimClassController; foreach (UIElement element in psmOnly) { element.Visibility = Visibility.Collapsed; } tbOnto.Text = attribute.OntologyEquivalent; }