Ejemplo n.º 1
0
        public MacPropertyGrid()
        {
            hostResourceProvider = new MonoDevelopHostResourceProvider();

            propertyEditorPanel = new MacPropertyEditorPanel(hostResourceProvider)
            {
                ShowHeader = false
            };
            AddSubview(propertyEditorPanel);

            #region Header Proppy Hack

            var subviews = propertyEditorPanel.Subviews;
            header            = subviews [0];
            propertyList      = subviews [1];
            internalTableView = propertyList.Subviews.OfType <NSScrollView> ()
                                .FirstOrDefault().DocumentView as NSTableView;

            //we need the second item constrained with the property list
            var topConstraint = propertyEditorPanel.Constraints.FirstOrDefault(s => s.FirstItem == propertyList && s.FirstAttribute == NSLayoutAttribute.Top);
            border = topConstraint.SecondItem as NSView;

            #endregion

            editorProvider = new ComponentModelEditorProvider();
            editorProvider.PropertyChanged += EditorProvider_PropertyChanged;

            propertyEditorPanel.TargetPlatform = new TargetPlatform(editorProvider)
            {
                AutoExpandAll = true
            };
            propertyEditorPanel.ArrangeMode = PropertyArrangeMode.Category;
        }
Ejemplo n.º 2
0
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (editorProvider != null)
         {
             editorProvider.PropertyChanged -= EditorProvider_PropertyChanged;
             editorProvider.Dispose();
             editorProvider = null;
         }
     }
     base.Dispose(disposing);
 }
Ejemplo n.º 3
0
        public MacPropertyGrid()
        {
            propertyEditorPanel = new MacPropertyEditorPanel(new MonoDevelopHostResourceProvider())
            {
                ShowHeader = false
            };
            AddSubview(propertyEditorPanel);

            editorProvider = new ComponentModelEditorProvider();
            editorProvider.PropertyChanged += EditorProvider_PropertyChanged;

            propertyEditorPanel.TargetPlatform = new TargetPlatform(editorProvider)
            {
                AutoExpandAll = true
            };
            propertyEditorPanel.ArrangeMode = PropertyArrangeMode.Category;
        }
Ejemplo n.º 4
0
 public ComponentModelObjectEditor(ComponentModelTarget propertyItem)
 {
     this.propertyItem = propertyItem;
     this.properties.AddRange(ComponentModelEditorProvider.GetPropertiesForProviders(propertyItem.Providers));
 }