如何使用代码(C#或VB)的数据绑定?WPF:与代码的数据绑定
这是我到目前为止,但它显示Binding.ToString
而不是m_Rep.FirstName
。
Public ReadOnly Property TabCaption As Object
Get
Return New Label With {.Foreground = Brushes.Black, .Content = New Binding("FirstName"), .DataContext = m_Rep}
End Get
End Property