'Declaration Public Event Changed As NamedStyleCollectionEventHandler
'Usage Dim instance As NamedStyleCollection Dim handler As NamedStyleCollectionEventHandler AddHandler instance.Changed, handler
public event NamedStyleCollectionEventHandler Changed
Event Data
The event handler receives an argument of type NamedStyleCollectionEventArgs containing data related to this event. The following NamedStyleCollectionEventArgs properties provide information specific to this event.
Property | Description |
---|---|
NewStyle | Gets the new style that was added, or null if no style was added. |
OldStyle | Gets the old style that was removed or changed, or null if no style was removed or changed. |
Type | Gets the type of event that occurred. |
Example
This example causes the Changed event to occur for the NamedStyleCollection object.
FarPoint.Win.Spread.NamedStyleCollection myCollection; private void Form1_Load(object sender, System.EventArgs e) { this.myCollection = new FarPoint.Win.Spread.NamedStyleCollection(); this.myCollection.Changed += new FarPoint.Win.Spread.NamedStyleCollectionEventHandler(this.myCollection_Changed); } private void menuItem1_Click(object sender, System.EventArgs e) { FarPoint.Win.Spread.NamedStyle ns = new FarPoint.Win.Spread.NamedStyle(); myCollection.Add(ns); } private void myCollection_Changed(object sender, FarPoint.Win.Spread.NamedStyleCollectionEventArgs e) { listBox1.Items.Add("Changed Event Fired"); }
Friend WithEvents myCollection As FarPoint.Win.Spread.NamedStyleCollection Private Sub MenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem1.Click myCollection = New FarPoint.Win.Spread.NamedStyleCollection() Dim ns As New FarPoint.Win.Spread.NamedStyle() myCollection.Add(ns) End Sub Private Sub myCollection_Changed(ByVal sender As Object, ByVal e As FarPoint.Win.Spread.NamedStyleCollectionEventArgs) Handles myCollection.Changed ListBox1.Items.Add("Changed Event Fired") End Sub
See Also