Пример #1
0
        protected internal override SizeF GetEditorSize(
            SizeF availableSize,
            DataFilterEditorElement editorElement)
        {
            SizeF sizeF     = availableSize;
            bool  isEditing = this.TreeViewElement.IsEditing;

            if (editorElement == this.logicalOperatorElement)
            {
                sizeF.Width = !isEditing || (double)this.cachedLogicalOperatorElementWidth <= 0.0 ? Math.Max((float)TelerikDpiHelper.ScaleInt(DataFilterGroupElement.DefaultLogicalOperatorWidth, this.DpiScaleFactor), availableSize.Width) : this.cachedLogicalOperatorElementWidth;
                this.cachedLogicalOperatorElementWidth = sizeF.Width;
            }
            return(sizeF);
        }
Пример #2
0
        protected internal override SizeF GetEditorSize(
            SizeF availableSize,
            DataFilterEditorElement editorElement)
        {
            SizeF sizeF     = availableSize;
            bool  isEditing = this.TreeViewElement.IsEditing;

            if (editorElement == this.fieldElement)
            {
                sizeF.Width = !isEditing || (double)this.cachedFieldElementWidth <= 0.0 ? Math.Max((float)TelerikDpiHelper.ScaleInt(DataFilterCriteriaElement.DefaultFieldWidth, this.DpiScaleFactor), availableSize.Width) : this.cachedFieldElementWidth;
                this.cachedFieldElementWidth = sizeF.Width;
            }
            else if (editorElement == this.operatorElement)
            {
                sizeF.Width = !isEditing || (double)this.cachedOperatorElementWidth <= 0.0 ? Math.Max((float)TelerikDpiHelper.ScaleInt(DataFilterCriteriaElement.DefaultOperatorWidth, this.DpiScaleFactor), availableSize.Width) : this.cachedOperatorElementWidth;
                this.cachedOperatorElementWidth = sizeF.Width;
            }
            else if (editorElement == this.valueElement)
            {
                sizeF.Width = !isEditing || (double)this.cachedValueElementWidth <= 0.0 ? Math.Max((float)TelerikDpiHelper.ScaleInt(DataFilterCriteriaElement.DefaultValueWidth, this.DpiScaleFactor), availableSize.Width) : this.cachedValueElementWidth;
                this.cachedValueElementWidth = sizeF.Width;
            }
            return(sizeF);
        }