در این ویدئوی آموزشی نحوه اضافه کردن آیتم به یک خصوصیت سفارشی با نوع محتوای ReadOnlyCollection توضیح داده شده...



ReadOnlyCollection.jpg


Private ItemsValue As New List(Of TextBox)
Public ReadOnly Property Items() As ReadOnlyCollection(Of TextBox)
Get
If Me.DesignMode = True Then
ItemsValue.Clear()
For Each Ctl As TextBox In LoadedComponents.Keys
ItemsValue.Add(Ctl)
Next
End If
Return ItemsValue.AsReadOnly
End Get
End Property