Imports System
Imports System.Collections

Partial Public Class BindingArrayList
	Inherits System.Web.UI.Page

	Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
		If Not IsPostBack Then
			DayPilotCalendar1.DataSource = getData()
			DataBind()
		End If
	End Sub

	Private Function getData() As ArrayList
		Dim al As New ArrayList()

		Dim ce As New CustomEvent()
		ce.Start = Convert.ToDateTime("15:30")
		ce.End = Convert.ToDateTime("16:30")
		ce.Name = "My event"
		ce.Id = "1"

		al.Add(ce)

		Return al

	End Function

	Public Class CustomEvent
'NOTE: The field name was renamed since Visual Basic does not allow fields to have the same name as other class members:
		Private name_Renamed As String
'NOTE: The field start was renamed since Visual Basic does not allow fields to have the same name as other class members:
		Private start_Renamed As Date
'NOTE: The field end was renamed since Visual Basic does not allow fields to have the same name as other class members:
		Private end_Renamed As Date
'NOTE: The field id was renamed since Visual Basic does not allow fields to have the same name as other class members:
		Private id_Renamed As String
		Private _allDay As Boolean

		Public Property Name() As String
			Get
				Return name_Renamed
			End Get
			Set(ByVal value As String)
				name_Renamed = value
			End Set
		End Property

		Public Property Start() As Date
			Get
				Return start_Renamed
			End Get
			Set(ByVal value As Date)
				start_Renamed = value
			End Set
		End Property

		Public Property [End]() As Date
			Get
				Return end_Renamed
			End Get
			Set(ByVal value As Date)
				end_Renamed = value
			End Set
		End Property

		Public Property AllDay() As Boolean
			Get
				Return _allDay
			End Get
			Set(ByVal value As Boolean)
				_allDay = value
			End Set
		End Property

		Public Property Id() As String
			Get
				Return id_Renamed
			End Get
			Set(ByVal value As String)
				id_Renamed = value
			End Set
		End Property
	End Class
	Protected Sub DayPilotCalendar1_Load(ByVal sender As Object, ByVal e As EventArgs)
	End Sub
End Class
