private bool NeedsCustomDraw(HeaderFormatStyle style) { if (style == null) { return(false); } return(this.NeedsCustomDraw(style.Normal) || this.NeedsCustomDraw(style.Hot) || this.NeedsCustomDraw(style.Pressed)); }
/// <summary> /// What style should be applied to the header? /// </summary> /// <param name="column"></param> /// <param name="isHot"></param> /// <param name="isPressed"></param> /// <returns></returns> 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)); }