Hello friends,

I have an extended ListView class and I wanted it to allow aplication to catch an event when its "View" property changes. Is the code below the best way to achieve this?

vb Code:
  1. Public Shadows Property View As View
  2.         Get
  3.             Return MyBase.View
  4.         End Get
  5.         Set(value As View)
  6.             MyBase.View = value
  7.             OnViewChanged(EventArgs.Empty)
  8.         End Set
  9.     End Property
  10.  
  11.     Public Event ViewChanged As EventHandler
  12.  
  13.     Protected Overridable Sub OnViewChanged(ByVal e As EventArgs)
  14.         RaiseEvent ViewChanged(Me, e)
  15.     End Sub

Thank you very much!