Hello,
I've a classe Game with a string property Name.
Public Class Game
Private _Name As String
Public Property Name As String
Get
Return _Name
End Get
Set(ByVal value As String)
_Name = value
End Set
End Property
End Class
in my viewmodel I declared
Public Property Newcompetition As New Game
In the view:
<TextBox Grid.Row="3" Grid.Column="2" Grid.ColumnSpan="6" HorizontalContentAlignment="Right" FontSize="16" FontWeight="Bold" FontFamily="Bahnschrift SemiBold" >
<TextBox.Text>
<Binding Path="Name" Source="Newcompetition"
UpdateSourceTrigger="PropertyChanged" Mode="Two Way"/>
</TextBox.Text>
I also placed a button, to debug purpose , with show a messagebox with newcompetition.Name value.
But binding seem not working, I still get exception that Newcompetition is empty.
Any Advice?