Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

CustomDrawFrozenPaneBorderEventArgs.Type Property

Gets whether the frozen pane is vertical or horizontal.

Namespace: DevExpress.XtraSpreadsheet

Assembly: DevExpress.XtraSpreadsheet.v24.2.dll

NuGet Package: DevExpress.Win.Spreadsheet

#Declaration

public FrozenPaneBorderType Type { get; }

#Property Value

Type Description
FrozenPaneBorderType

A FrozenPaneBorderType enumeration member.

Available values:

Name Description
Vertical

The vertical frozen pane (frozen columns).

Horizontal

The horizontal frozen pane (frozen rows).

#Remarks

Use the Type property to paint the vertical and horizontal frozen pane borders individually.

#Example

The following code paints borders of the vertical and horizontal frozen panes in different colors and line widths. The worksheet appears as shown in the image below.

SpreadsheetControl_CustomDrawFrozenPaneBorder

using System.Drawing;
using System.Windows.Forms;
using DevExpress.XtraSpreadsheet;

// ...

       private void spreadsheetControl1_CustomDrawFrozenPaneBorder
       (object sender, CustomDrawFrozenPaneBorderEventArgs e)
       {
            e.Handled = true;

            // Vertical frozen pane border
            //(line color is pink, line width is 3)
            if (e.Type == FrozenPaneBorderType.Vertical)
                using (Pen pen = new Pen(Color.DeepPink, 3))
                {
                    e.Graphics.DrawLine(pen, e.Point1, e.Point2);
                }


            // Horizontal frozen pane border
            //(line color is violet, line width is default)
            else 
               e.Graphics.DrawLine(Pens.BlueViolet, e.Point1, e.Point2);
        }
See Also