Spread Windows Forms 12.0 Product Documentation
Type Property (SheetStyleModelEventArgs)
Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread.Model Namespace > SheetStyleModelEventArgs Class : Type Property
Gets the type of event that occurred.
Syntax
'Declaration
 
Public ReadOnly Property Type As SheetStyleModelEventType
'Usage
 
Dim instance As SheetStyleModelEventArgs
Dim value As SheetStyleModelEventType
 
value = instance.Type
public SheetStyleModelEventType Type {get;}

Property Value

SheetStyleModelEventType setting that determines the type of event
Example
This example returns the type of event that occurred when the style was changed. In this case the CellsUpdated event is returned.
FarPoint.Win.Spread.Model.BaseSheetStyleModel model;

model = (FarPoint.Win.Spread.Model.BaseSheetStyleModel)fpSpread1.ActiveSheet.Models.Style;

model.Changed += new FarPoint.Win.Spread.Model.SheetStyleModelEventHandler(model_StyleModelChanged);
    
private void button1_Click(object sender, System.EventArgs e)
{
    FarPoint.Win.Spread.StyleInfo sInfo = new FarPoint.Win.Spread.StyleInfo();
    sInfo.BackColor = Color.Teal;
    model.AltRowCount = 2;
    model.SetDirectAltRowInfo(0, sInfo);
}

private void model_StyleModelChanged(object sender, FarPoint.Win.Spread.Model.SheetStyleModelEventArgs e)
{
    textBox1.Text = e.ColumnCount.ToString();
}
Friend WithEvents model As FarPoint.Win.Spread.Model.BaseSheetStyleModel

model = fpSpread1.ActiveSheet.Models.Style

Dim h As FarPoint.Win.Spread.Model.SheetStyleModelEventHandler = AddressOf model_StyleModelChanged
AddHandler model.Changed, h

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Dim sInfo As New FarPoint.Win.Spread.StyleInfo
    sInfo.BackColor = Color.Teal
    model.AltRowCount = 2
    model.SetDirectAltRowInfo(0, sInfo)
End Sub

Private Sub model_StyleModelChanged(ByVal sender As Object, ByVal e As FarPoint.Win.Spread.Model.SheetStyleModelEventArgs)
    TextBox1.Text = e.ColumnCount.ToString()
End Sub
See Also

Reference

SheetStyleModelEventArgs Class
SheetStyleModelEventArgs Members