Spread Silverlight Documentation
HitTestType Enumeration
Example Example 


GrapeCity.Windows.SpreadSheet.UI Namespace : HitTestType Enumeration
Specifies the locations in the component for the HitTest method.
Syntax
'Declaration
 
Public Enum HitTestType 
   Inherits System.Enum
'Usage
 
Dim instance As HitTestType
public enum HitTestType : System.Enum 
Members
MemberDescription
ColumnHeader Specifies that the location is in the column header area of the component.
ColumnRangeGroup Specifies that the location is in the column range group of the component.
ColumnSplitBar Specifies that the location is in the column splitter bar area of the component.
ColumnSplitBox Specifies that the location is in the column split box of the component.
Corner Specifies that the location is in the upper left sheet corner of a workbook.
CornerRangeGroup Specifies that the location is in the range group corner of the component.
Empty Specifies an empty location.
FloatingObject
FormulaSelection
HorizontalScrollBar Specifies that the location is in the horizontal scroll bar of the component.
RowHeader Specifies that the location is in the row header area of the component.
RowRangeGroup Specifies that the location is in the row range group of the component.
RowSplitBar Specifies that the location is in the row splitter bar area of the component.
RowSplitBox Specifies that the location is in the row split box of the component.
TabSplitBox Specifies that the location is in the tab split box of the component.
TabStrip Specifies that the location is in the sheet name tab area of the component.
VerticalScrollBar Specifies that the location is in the vertical scroll bar of the component.
Viewport Specifies that the location is in a viewport of the data area of the component.
Example
This example uses the HitTestType enumeration.
gcSpreadSheet1.CanCellOverflow = true;
void gcSpread1_MouseDown(object sender, MouseButtonEventArgs e)
        {
            HitTestInformation info = gcSpreadSheet1.HitTest(e.GetPosition(gcSpreadSheet1).X, e.GetPosition(gcSpreadSheet1).Y);
            if (info.HitTestType == HitTestType.Corner)
                gcSpreadSheet1.Sheets [0].SetText (0,0,"Click SheetCorner of control");
            if (info.HeaderInfo != null)
            {
                if (info.HeaderInfo.InColumnResize)
                    gcSpreadSheet1.Sheets[0].SetText(0, 0, "Column" + info.HeaderInfo.Column.ToString() + " is resizing");
                else if (info.HeaderInfo.InRowResize)
                    gcSpreadSheet1.Sheets[0].SetText(0, 0, "Row" + info.HeaderInfo.Row.ToString() + " is resizing");
            }
}
GcSpreadSheet1.CanCellOverflow = True
   Private Sub GcSpreadSheet1_MouseDown(sender As System.Object, e As System.Windows.Input.MouseButtonEventArgs)
        Dim info As HitTestInformation = GcSpreadSheet1.HitTest(e.GetPosition(GcSpreadSheet1).X, e.GetPosition(GcSpreadSheet1).Y)
        If (info.HitTestType = HitTestType.Corner) Then
            GcSpreadSheet1.Sheets(0).SetText(0, 0, "Click SheetCorner of control")
        End If

        If (info.HeaderInfo IsNot Nothing) Then
            If (info.HeaderInfo.InColumnResize) Then
                GcSpreadSheet1.Sheets(0).SetText(0, 0, "Column" + info.HeaderInfo.Column.ToString() + " is resizing")
            ElseIf (info.HeaderInfo.InRowResize) Then
                GcSpreadSheet1.Sheets(0).SetText(0, 0, "Row" + info.HeaderInfo.Row.ToString() + " is resizing")
            End If
        End If
    End Sub
Inheritance Hierarchy

System.Object
   System.ValueType
      System.Enum
         GrapeCity.Windows.SpreadSheet.UI.HitTestType

See Also

Reference

GrapeCity.Windows.SpreadSheet.UI Namespace