示例#1
0
        //private RepositoryItemFontEdit repositoryItemFontEdit1;
        public PropertyGridControl()
        {
            if (!DesignMode)
            {
                Dock = DockStyle.Fill;
                //LookAndFeel.SkinName = "Lilian";
                //LookAndFeel.UseDefaultLookAndFeel = false;

                //repositoryItemFontEdit1 = new RepositoryItemFontEdit();
                RepositoryItemPictureEdit repositoryItemPictureEdit1 = new RepositoryItemPictureEdit();
                repositoryItemPictureEdit1.CustomHeight = 64;
                repositoryItemPictureEdit1.ReadOnly     = true;
                repositoryItemPictureEdit1.ShowMenu     = false;
                repositoryItemPictureEdit1.SizeMode     = DevExpress.XtraEditors.Controls.PictureSizeMode.Zoom;

                LineStyleRepositoryItemEdit lineStypeEdit = new LineStyleRepositoryItemEdit();
                RepositoryItemPWColorEdit   colorEditor   = new RepositoryItemPWColorEdit();
                //RepositoryItemColorEdit colorEditor = new RepositoryItemColorEdit();
                colorEditor.ShowSystemColors = false;

                this.DefaultEditors.AddRange(new DevExpress.XtraVerticalGrid.Rows.DefaultEditor[]
                {
                    new DevExpress.XtraVerticalGrid.Rows.DefaultEditor(typeof(System.Drawing.Image),
                                                                       repositoryItemPictureEdit1)
                    , new DefaultEditor(typeof(DashKind), lineStypeEdit)
                    , new DefaultEditor(typeof(Color), colorEditor)
                });

                RepositoryItems.AddRange(new RepositoryItem[]
                {
                    repositoryItemPictureEdit1
                    , lineStypeEdit
                    , colorEditor
                });
                AutoGenerateRows = true;

                TreeButtonStyle = TreeButtonStyle.TreeView;
                lineStypeEdit.SelectedIndexChanged += new EventHandler(lineStypeEdit_SelectedIndexChanged);
                CellValueChanged += new DevExpress.XtraVerticalGrid.Events.CellValueChangedEventHandler(PropertyGridControl_CellValueChanged);
            }
            RegisterHelp();
        }
示例#2
0
 static PWColorEdit()
 {
     RepositoryItemPWColorEdit.Register();
 }