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
        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.º 3
0
        public MacPropertyGrid()
        {
            Orientation  = NSUserInterfaceLayoutOrientation.Vertical;
            Alignment    = NSLayoutAttribute.Leading;
            Spacing      = 10;
            Distribution = NSStackViewDistribution.Fill;

            propertyEditorPanel = new MacPropertyEditorPanel(new MonoDevelopHostResourceProvider());

            scrollView = new NSScrollView()
            {
                HasVerticalScroller   = true,
                HasHorizontalScroller = false,
            };
            scrollView.WantsLayer      = true;
            scrollView.BackgroundColor = Styles.HeaderBackgroundColor;
            scrollView.DocumentView    = propertyEditorPanel;

            AddArrangedSubview(scrollView);

            propertyEditorPanel.Focused += PropertyEditorPanel_Focused;

            //propertyEditorPanel.PropertiesChanged += PropertyEditorPanel_PropertiesChanged;
        }