示例#1
0
        private bool NeedsCustomDraw(HeaderFormatStyle style)
        {
            if (style == null)
            {
                return(false);
            }

            return(this.NeedsCustomDraw(style.Normal) ||
                   this.NeedsCustomDraw(style.Hot) ||
                   this.NeedsCustomDraw(style.Pressed));
        }
示例#2
0
        protected HeaderStateStyle CalculateStyle(OLVColumn column, bool isHot, bool isPressed)
        {
            HeaderFormatStyle headerStyle =
                column.HeaderFormatStyle ?? this.ListView.HeaderFormatStyle ?? new HeaderFormatStyle();

            if (this.ListView.IsDesignMode)
            {
                return(headerStyle.Normal);
            }
            if (isPressed)
            {
                return(headerStyle.Pressed);
            }
            if (isHot)
            {
                return(headerStyle.Hot);
            }
            return(headerStyle.Normal);
        }
        private bool NeedsCustomDraw(HeaderFormatStyle style) {
            if (style == null)
                return false;

            return (this.NeedsCustomDraw(style.Normal) || 
                this.NeedsCustomDraw(style.Hot) ||
                this.NeedsCustomDraw(style.Pressed));
        }