Version

OnPropertyChanged Method (UltraGroupBox)

Called when a property or subobject's property value has changed.
Syntax
'Declaration
 
Protected Overrides Sub OnPropertyChanged( _
   ByVal e As Infragistics.Win.PropertyChangedEventArgs _
) 
protected override void OnPropertyChanged( 
   Infragistics.Win.PropertyChangedEventArgs e
)

Parameters

e
Example
The following sample code illustrates how the PropertyChanged event can be used.

For an overview of how to handle events in Visual Basic or Visual C#, see Event Handlers in Visual Basic and Visual C#. For specific information and code examples illustrating how to consume events in your application, see Consuming Events in the .NET Framework Developer's Guide.

Private Sub ultraListBar1_PropertyChanged(ByVal sender As Object, ByVal e As Infragistics.Win.PropertyChangedEventArgs) Handles ultraListBar1.PropertyChanged
    
    Dim pci As Infragistics.Shared.PropChangeInfo

    ' see if the text property has changed
    pci = e.ChangeInfo.FindPropId(Infragistics.Win.UltraWinListBar.PropertyIds.Text)

    If Not pci Is Nothing Then
        If TypeOf (pci.Source) Is Infragistics.Win.UltraWinListBar.Group Then
            ' if the source is a group
            ' display its key and new name

            Dim group As Infragistics.Win.UltraWinListBar.Group

            group = pci.Source

            Debug.WriteLine("Group " + group.Key + "'s text has changed to: " + group.Text)
        ElseIf TypeOf (pci.Source) Is Infragistics.Win.UltraWinListBar.Item Then
            ' if the source is a item
            ' display its key and new name

            Dim item As Infragistics.Win.UltraWinListBar.Item

            item = pci.Source

            Debug.WriteLine("Item " + item.Key + "'s text has changed to: " + item.Text)
        End If
    End If

End Sub
private void ultraListBar1_PropertyChanged(object sender, Infragistics.Win.PropertyChangedEventArgs e)
{

	Infragistics.Shared.PropChangeInfo pci;

	// see if the text property has changed
	pci = e.ChangeInfo.FindPropId( Infragistics.Win.UltraWinListBar.PropertyIds.Text );

	if ( pci != null )
	{
		Infragistics.Win.UltraWinListBar.Group group;

		// if the source is a group
		// display its key and new name
		group = pci.Source as Infragistics.Win.UltraWinListBar.Group;

		if ( group != null )
		{
			Debug.WriteLine( "Group " + group.Key + "'s text has changed to: " + group.Text );
		}
		else
		{
			Infragistics.Win.UltraWinListBar.Item item;

			// if the source is a item
			// display its key and new name
			item = pci.Source as Infragistics.Win.UltraWinListBar.Item;

			if ( item != null )
			{
				Debug.WriteLine( "Item " + item.Key + "'s text has changed to: " + item.Text );
			}
		}
	}

}
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also