VB.Net WPF 응용 프로그램에 ComboBox
이 있습니다. 에서 VB.Net의 ComboBox에 바인딩 목록 WPF 응용 프로그램
<ComboBox HorizontalAlignment="Left" Margin="77,49,0,0" VerticalAlignment="Top" Width="120" ItemsSource="{Binding Path=Server.RecipeList()}" DisplayMemberPath="RecipeID" SelectedValuePath="RecipeID"/>
코드 숨김, 내가 서버라는 클래스 변수가 있습니다
Private mRecipeList As New List(Of Recipe)
그리고 내 기본 생성자 : 내 서버 개체에서
Public Server As BatchServer = New BatchServer
을, 나는 List
이 서버는
Public Sub New()
Server = New BatchRemote.RemoteSupport
PopulateRecipeList()
End Sub
List
을 ComboBox
에 바인딩하고 싶으므로 내 목록에 각 래서 피의 RecipeID가 표시되어야합니다. 첫 번째 코드 블록에서와 마찬가지로 내 데이터 바인딩이 보이지만 응용 프로그램을 실행할 때 ComboBox
은 항상 비어 있습니다.
내가 뭘 잘못하고 있니?