Imports System
Imports System.Collections.Generic
Imports System.Linq
Imports System.Text
Imports System.ComponentModel
Imports System.Collections.ObjectModel

Namespace RadGridView_WPF_AR_162
	Public Class MyViewModel
		Implements INotifyPropertyChanged

		Public Event PropertyChanged As PropertyChangedEventHandler Implements INotifyPropertyChanged.PropertyChanged

'INSTANT VB NOTE: The field clubs was renamed since Visual Basic does not allow fields to have the same name as methods:
		Private clubs_Renamed As ObservableCollection(Of Club)
'INSTANT VB NOTE: The field selectedItem was renamed since Visual Basic does not allow fields to have the same name as methods:
		Private selectedItem_Renamed As Object

		Public ReadOnly Property Clubs() As ObservableCollection(Of Club)
			Get
				If Me.clubs_Renamed Is Nothing Then
					Me.clubs_Renamed = Club.GetClubs()
				End If

				Return Me.clubs_Renamed
			End Get
		End Property

		Public Property SelectedItem() As Object
			Get
				Return Me.selectedItem_Renamed
			End Get
			Set(ByVal value As Object)
				If value IsNot Me.selectedItem_Renamed Then
					Me.selectedItem_Renamed = value
					Me.OnPropertyChanged("SelectedItem")
				End If
			End Set
		End Property

		Protected Overridable Sub OnPropertyChanged(ByVal args As PropertyChangedEventArgs)
			Dim handler As PropertyChangedEventHandler = Me.PropertyChangedEvent
			If handler IsNot Nothing Then
				handler(Me, args)
			End If
		End Sub

		Private Sub OnPropertyChanged(ByVal propertyName As String)
			Me.OnPropertyChanged(New PropertyChangedEventArgs(propertyName))
		End Sub
	End Class
End Namespace
