Esempio n. 1
0
        public override void ItemStateChanged(RadItem senderItem, RadPropertyChangedEventArgs changeArgs)
        {
            PropertyGridExpanderElement expanderElement = senderItem as PropertyGridExpanderElement;

            if (changeArgs != null && !expanderElement.Enabled)
            {
                if (expanderElement.ExpanderItem.Expanded)
                {
                    this.SetItemState(senderItem, "Disabled" + ItemStateManagerBase.stateDelimiter + "IsExpanded");
                    return;
                }
            }

            base.ItemStateChanged(senderItem, changeArgs);
        }
        public override void ItemStateChanged(
            RadObject senderItem,
            RadPropertyChangedEventArgs changeArgs)
        {
            PropertyGridExpanderElement gridExpanderElement = senderItem as PropertyGridExpanderElement;

            if (changeArgs != (RadPropertyChangedEventArgs)null && !gridExpanderElement.Enabled && gridExpanderElement.ExpanderItem.Expanded)
            {
                this.SetItemState(senderItem, "Disabled" + (object)'.' + "IsExpanded");
            }
            else
            {
                base.ItemStateChanged(senderItem, changeArgs);
            }
        }
Esempio n. 3
0
 protected override void CreateChildElements()
 {
     this.stack = new StackLayoutElement();
     this.stack.FitInAvailableSize       = true;
     this.stack.StretchHorizontally      = true;
     this.stack.StretchVertically        = true;
     this.stack.NotifyParentOnMouseInput = true;
     this.stack.ShouldHandleMouseInput   = false;
     this.stack.FitToSizeMode            = RadFitToSizeMode.FitToParentBounds;
     this.headerElement   = this.CreatePropertyGridRowHeaderElement();
     this.indentElement   = this.CreatePropertyGridIndentElement();
     this.expanderElement = this.CreatePropertyGridExpanderElement();
     this.textElement     = this.CreatePropertyGridTextElement();
     this.valueElement    = this.CreatePropertyGridValueElement();
     this.stack.Children.Add((RadElement)this.headerElement);
     this.stack.Children.Add((RadElement)this.indentElement);
     this.stack.Children.Add((RadElement)this.expanderElement);
     this.stack.Children.Add((RadElement)this.textElement);
     this.stack.Children.Add((RadElement)this.valueElement);
     this.Children.Add((RadElement)this.stack);
 }