public PropertyGridItemBase(PropertyGridTableElement propertyGridElement) { this.propertyGridTableElement = propertyGridElement; this.Visible = true; this.state[IsEnableState] = true; this.state[IsVisibleState] = true; }
public PropertyGridItem( PropertyGridTableElement propertyGridElement, PropertyGridItem parentItem) : base(propertyGridElement) { this.parentItem = parentItem; }
public PropertyGridGroupItem( PropertyGridTableElement propertyGridElement, PropertyGridGroup dataGroup) : base(propertyGridElement) { this.dataGroup = dataGroup; }
public PropertyGridItemBase(PropertyGridTableElement propertyGridElement) { this.propertyGridTableElement = propertyGridElement; this.state[4] = true; this.state[8] = true; this.state[4] = true; }
protected override SizeF MeasureOverride(SizeF availableSize) { SizeF desiredSize = Size.Empty; PropertyGridItemElement visualItem = this.VisualItem as PropertyGridItemElement; PropertyGridTableElement propertyGridTableElement = this.PropertyGridTableElement; if (propertyGridTableElement != null && visualItem != null) { PropertyGridItem dataItem = visualItem.Data as PropertyGridItem; if (dataItem != null) { desiredSize.Width = propertyGridTableElement.ItemIndent * dataItem.Level; if (float.IsPositiveInfinity(availableSize.Height)) { desiredSize.Height = propertyGridTableElement.ItemHeight; } else { desiredSize.Height = availableSize.Height; } } } return(desiredSize); }
public PropertyGridCustomGroupingEventArgs( PropertyGridTableElement table, PropertyGridItem item) { this.propertyGridTable = table; this.item = item; }
public PropertyGridGroup(object key, Group <PropertyGridItem> parent, PropertyGridTableElement propertyGridElement) : base(key, parent) { this.groupData = new PropertyGridGroupItem(propertyGridElement, this); this.groupData.SuspendPropertyNotifications(); this.groupData.Expanded = propertyGridElement.AutoExpandGroups; this.groupData.ResumePropertyNotifications(); }
protected override void CreateChildElements() { base.CreateChildElements(); this.propertyTableElement = this.CreateTableElement(); this.sizeGripElement = this.CreateSizeGripElement(); this.helpElement = this.CreateHelpElement(); this.Children.Add((RadElement)this.propertyTableElement); this.Children.Add((RadElement)this.sizeGripElement); this.Children.Add((RadElement)this.helpElement); }
public PropertyGridDefaultContextMenu(PropertyGridTableElement propertyGridElement) { this.propertyGridElement = propertyGridElement; this.resetMenuItem = new PropertyGridMenuItem("Reset", PropertyGridLocalizationProvider.CurrentProvider.GetLocalizedString(PropertyGridStringId.ContextMenuReset)); this.Items.Add(resetMenuItem); this.editMenuItem = new PropertyGridMenuItem("Edit", PropertyGridLocalizationProvider.CurrentProvider.GetLocalizedString(PropertyGridStringId.ContextMenuEdit)); this.Items.Add(editMenuItem); this.expandCollapseMenuItem = new PropertyGridMenuItem("Expand", PropertyGridLocalizationProvider.CurrentProvider.GetLocalizedString(PropertyGridStringId.ContextMenuExpand)); this.Items.Add(expandCollapseMenuItem); this.Items.Add(new RadMenuSeparatorItem()); RadMenuItem sortItem = new RadMenuItem(PropertyGridLocalizationProvider.CurrentProvider.GetLocalizedString(PropertyGridStringId.ContextMenuSort)); this.Items.Add(sortItem); noSortMenuItem = new PropertyGridMenuItem("NoSort", PropertyGridLocalizationProvider.CurrentProvider.GetLocalizedString(PropertyGridStringId.ContextMenuNoSort)); noSortMenuItem.Click += menuItem_Click; sortItem.Items.Add(noSortMenuItem); alphabeticalMenuItem = new PropertyGridMenuItem("Alphabetical", PropertyGridLocalizationProvider.CurrentProvider.GetLocalizedString(PropertyGridStringId.ContextMenuAlphabetical)); alphabeticalMenuItem.Click += menuItem_Click; sortItem.Items.Add(alphabeticalMenuItem); categorizedMenuItem = new PropertyGridMenuItem("Categorized", PropertyGridLocalizationProvider.CurrentProvider.GetLocalizedString(PropertyGridStringId.ContextMenuCategorized)); categorizedMenuItem.Click += menuItem_Click; sortItem.Items.Add(categorizedMenuItem); categorizedAlphabeticalMenuItem = new PropertyGridMenuItem("CategorizedAlphabetical", PropertyGridLocalizationProvider.CurrentProvider.GetLocalizedString(PropertyGridStringId.ContextMenuCategorizedAlphabetical)); categorizedAlphabeticalMenuItem.Click += menuItem_Click; sortItem.Items.Add(categorizedAlphabeticalMenuItem); this.Items.Add(new RadMenuSeparatorItem()); this.showDescriptionMenuItem = new PropertyGridMenuItem("ShowDescription", PropertyGridLocalizationProvider.CurrentProvider.GetLocalizedString(PropertyGridStringId.ContextMenuShowDescription)); this.Items.Add(showDescriptionMenuItem); this.showToolbarMenuItem = new PropertyGridMenuItem("ShowToolbar", PropertyGridLocalizationProvider.CurrentProvider.GetLocalizedString(PropertyGridStringId.ContextMenuShowToolbar)); this.Items.Add(showToolbarMenuItem); for (int i = 0; i < this.Items.Count; i++) { this.Items[i].Click += menuItem_Click; } }
protected override void CreateChildElements() { base.CreateChildElements(); this.propertyTableElement = new PropertyGridTableElement(); this.sizeGripElement = new PropertyGridSizeGripElement(); this.helpElement = new PropertyGridHelpElement(); this.Children.Add(this.propertyTableElement); this.Children.Add(this.sizeGripElement); this.Children.Add(this.helpElement); }
protected override SizeF MeasureOverride(SizeF availableSize) { SizeF empty = (SizeF)Size.Empty; PropertyGridGroupElement visualItem = this.VisualItem as PropertyGridGroupElement; PropertyGridTableElement gridTableElement = this.PropertyGridTableElement; if (gridTableElement != null && visualItem != null && visualItem.Data is PropertyGridGroupItem) { empty.Width = (float)gridTableElement.ItemIndent; empty.Height = !float.IsPositiveInfinity(availableSize.Height) ? availableSize.Height : (float)gridTableElement.ItemHeight; } return(empty); }
void propertyValueButton_Click(object sender, System.EventArgs e) { RadContextMenu menu = PropertyGridTableElement.GetElementContextMenu(this.VisualItem); if (menu != null) { if (this.PropertyGridTableElement.IsEditing) { if (!this.PropertyGridTableElement.EndEdit()) { return; } } menu.Show(this.ElementTree.Control, this.propertyValueButton.ControlBoundingRectangle.X, this.propertyValueButton.ControlBoundingRectangle.Bottom); } }
protected virtual void UpdateSignImage() { PropertyGridTableElement propertyGridTableElement = PropertyGridTableElement; if (propertyGridTableElement == null) { return; } if (this.expanderItem.Expanded) { if (SetSignImage(propertyGridTableElement, PropertyGridTableElement.HoveredExpandImageProperty)) { return; } if (SetSignImage(propertyGridTableElement, PropertyGridTableElement.ExpandImageProperty)) { return; } } if (SetSignImage(propertyGridTableElement, PropertyGridTableElement.HoveredCollapseImageProperty)) { return; } if (SetSignImage(propertyGridTableElement, PropertyGridTableElement.CollapseImageProperty)) { return; } if (this.signImageSet) { this.signImageSet = false; this.ResetValue(ExpanderItem.SignImageProperty, ValueResetFlags.Local); this.ResetValue(ExpanderItem.DrawSignBorderProperty, ValueResetFlags.Local); this.ResetValue(ExpanderItem.DrawSignFillProperty, ValueResetFlags.Local); } }
protected virtual void DropEditor() { UITypeEditor editor = this.Editor; if (editor == null) { return; } try { PropertyGridItemElement ancestor1 = this.FindAncestor <PropertyGridItemElement>(); if (ancestor1 == null) { return; } PropertyGridItem data = ancestor1.Data as PropertyGridItem; if (data == null) { return; } this.currentValue = !this.Validate() ? data.Value : this.Converter.ConvertFromString((ITypeDescriptorContext)data, Thread.CurrentThread.CurrentCulture, this.Text); object obj = editor.EditValue((ITypeDescriptorContext)data, (IServiceProvider)this.editorService, this.currentValue); bool expanded = data.Expanded; PropertyGridTableElement ancestor2 = this.FindAncestor <PropertyGridTableElement>(); if (data.Expandable) { data.Collapse(); ancestor1.UpdateLayout(); } this.Value = obj; this.Text = this.Converter.ConvertToString((ITypeDescriptorContext)data, Thread.CurrentThread.CurrentCulture, obj); ancestor2?.EndEdit(); data.Expanded = expanded; } catch (Exception ex) { } }
public PropertyGridDefaultContextMenu(PropertyGridTableElement propertyGridElement) { this.propertyTableElement = propertyGridElement; this.resetMenuItem = new PropertyGridMenuItem("Reset", LocalizationProvider <PropertyGridLocalizationProvider> .CurrentProvider.GetLocalizedString("ContextMenuReset")); this.Items.Add((RadItem)this.resetMenuItem); this.editMenuItem = new PropertyGridMenuItem("Edit", LocalizationProvider <PropertyGridLocalizationProvider> .CurrentProvider.GetLocalizedString("ContextMenuEdit")); this.Items.Add((RadItem)this.editMenuItem); this.expandCollapseMenuItem = new PropertyGridMenuItem("Expand", LocalizationProvider <PropertyGridLocalizationProvider> .CurrentProvider.GetLocalizedString("ContextMenuExpand")); this.Items.Add((RadItem)this.expandCollapseMenuItem); this.firstSeparator = new RadMenuSeparatorItem(); this.Items.Add((RadItem)this.firstSeparator); this.sortMenuItem = new PropertyGridMenuItem("Sort", LocalizationProvider <PropertyGridLocalizationProvider> .CurrentProvider.GetLocalizedString("ContextMenuSort")); this.Items.Add((RadItem)this.sortMenuItem); this.noSortMenuItem = new PropertyGridMenuItem("NoSort", LocalizationProvider <PropertyGridLocalizationProvider> .CurrentProvider.GetLocalizedString("ContextMenuNoSort")); this.noSortMenuItem.Click += new EventHandler(this.menuItem_Click); this.sortMenuItem.Items.Add((RadItem)this.noSortMenuItem); this.alphabeticalMenuItem = new PropertyGridMenuItem("Alphabetical", LocalizationProvider <PropertyGridLocalizationProvider> .CurrentProvider.GetLocalizedString("ContextMenuAlphabetical")); this.alphabeticalMenuItem.Click += new EventHandler(this.menuItem_Click); this.sortMenuItem.Items.Add((RadItem)this.alphabeticalMenuItem); this.categorizedMenuItem = new PropertyGridMenuItem("Categorized", LocalizationProvider <PropertyGridLocalizationProvider> .CurrentProvider.GetLocalizedString("ContextMenuCategorized")); this.categorizedMenuItem.Click += new EventHandler(this.menuItem_Click); this.sortMenuItem.Items.Add((RadItem)this.categorizedMenuItem); this.categorizedAlphabeticalMenuItem = new PropertyGridMenuItem("CategorizedAlphabetical", LocalizationProvider <PropertyGridLocalizationProvider> .CurrentProvider.GetLocalizedString("ContextMenuCategorizedAlphabetical")); this.categorizedAlphabeticalMenuItem.Click += new EventHandler(this.menuItem_Click); this.sortMenuItem.Items.Add((RadItem)this.categorizedAlphabeticalMenuItem); this.Items.Add((RadItem) new RadMenuSeparatorItem()); this.showDescriptionMenuItem = new PropertyGridMenuItem("ShowDescription", LocalizationProvider <PropertyGridLocalizationProvider> .CurrentProvider.GetLocalizedString("ContextMenuShowDescription")); this.Items.Add((RadItem)this.showDescriptionMenuItem); this.showToolbarMenuItem = new PropertyGridMenuItem("ShowToolbar", LocalizationProvider <PropertyGridLocalizationProvider> .CurrentProvider.GetLocalizedString("ContextMenuShowToolbar")); this.Items.Add((RadItem)this.showToolbarMenuItem); for (int index = 0; index < this.Items.Count; ++index) { this.Items[index].Click += new EventHandler(this.menuItem_Click); } LocalizationProvider <PropertyGridLocalizationProvider> .CurrentProviderChanged += new EventHandler(this.PropertyGridLocalizationProvider_CurrentProviderChanged); }
public PropertyGridRootItemsCollection(PropertyGridTableElement tableElement) { this.tableElement = tableElement; }
public PropertyGridGroupItemCollection(PropertyGridTableElement tableElement) { this.tableElement = tableElement; }
public PropertyGridTraverser(PropertyGridTableElement propertyGridElement) { this.propertyGridElement = propertyGridElement; }
public PropertyGridItem(PropertyGridTableElement propertyGridElement) : this(propertyGridElement, null) { }
public PropertyGridGroupFactory(PropertyGridTableElement propertyGridElement) { this.propertyGridElement = propertyGridElement; }
public PropertyGridItemProvider(PropertyGridTableElement propertyGridElement) { this.propertyGridElement = propertyGridElement; }
public PropertyGridItemComparer(PropertyGridTableElement propertyGridElement) { this.propertyGridElement = propertyGridElement; this.Update(); }