xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:scm="clr-namespace:System.ComponentModel;assembly=WindowsBase"
xmlns:src="clr-namespace:WpfApplication1"
xmlns:dat="clr-namespace:System.Windows.Data;assembly=PresentationFramework"
Title="CollectionViewSourceSample">
//File:Window.xaml.vb
Imports System.Windows
Imports System.Collections.ObjectModel
Namespace WpfApplication1
Public Partial Class Window1
Inherits Window
Public Sub New()
InitializeComponent()
End Sub
End Class
Public Class Place
Private name As String
Private m_state As String
Public Property CityName() As String
Get
Return name
End Get
Set
name = value
End Set
End Property
Public Property State() As String
Get
Return m_state
End Get
Set
m_state = value
End Set
End Property
Public Sub New()
Me.name = ""
Me.m_state = ""
End Sub
Public Sub New(name As String, state As String)
Me.name = name
Me.m_state = state
End Sub
End Class
Public Class Places
Inherits ObservableCollection(Of Place)
Public Sub New()
Add(New Place("A", "WA"))
Add(New Place("B", "WA"))
Add(New Place("C", "WA"))
End Sub
End Class
End Namespace