void PropertyGridBrowseEditor_DialogClosed(object sender, DialogClosedEventArgs e) { PropertyGridItemElement visualItem = this.OwnerElement as PropertyGridItemElement; if (visualItem != null && visualItem.IsInValidState(true)) { visualItem.PropertyTableElement.EndEdit(); } }
public override void OnLostFocus() { PropertyGridItemElement visualItem = this.OwnerElement as PropertyGridItemElement; if (visualItem != null && visualItem.IsInValidState(true) && !visualItem.ElementTree.Control.Focused) { visualItem.PropertyTableElement.EndEdit(); } }
private void PropertyGridColorEditor_DialogClosed(object sender, DialogClosedEventArgs e) { PropertyGridItemElement ownerElement = this.OwnerElement as PropertyGridItemElement; if (ownerElement == null || !ownerElement.IsInValidState(true)) { return; } ownerElement.PropertyTableElement.EndEdit(); }
protected override void OnLostFocus() { base.OnLostFocus(); PropertyGridItemElement ownerElement = this.OwnerElement as PropertyGridItemElement; if (ownerElement == null || !ownerElement.IsInValidState(true) || (ownerElement.ElementTree.Control.Focused || ownerElement.ElementTree.Control.ContainsFocus)) { return; } ownerElement.PropertyTableElement.EndEdit(); }
protected virtual void OnKeyPress(KeyPressEventArgs e) { if (e.KeyChar != '\r') { return; } PropertyGridItemElement ownerElement = this.OwnerElement as PropertyGridItemElement; if (ownerElement == null || !ownerElement.IsInValidState(true) || ownerElement.ElementTree.Control.Focused) { return; } ownerElement.PropertyTableElement.EndEdit(); }