Hey, having a bit of trouble with data binding. Followed a few tuts, and read information, but still really foggy. I'll add the code here...


Imports System.ComponentModel
Public Class StatusBarClass
    Implements INotifyPropertyChanged
    Public statusText As String

    Sub setStatus()
    End Sub
    Sub setStatus(ByVal status As String)
        Me.statusText = status
    End Sub
    ' Declare the event
    Public Event PropertyChanged As PropertyChangedEventHandler Implements INotifyPropertyChanged.PropertyChanged
    Public Property status() As String
            Return statusText
        End Get
        Set(value As String)
            statusText = value
            ' Call OnPropertyChanged whenever the property is updated
        End Set
    End Property
    Public Sub onPropertyChanged(ByVal status As String)
        RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(statusText))
    End Sub
End Class

Main window Vb Instance of object being used

Case 1
                Dim spellName As String
                spellName = "fireball"
                Dim StatBar = New StatusBarClass
                StatBar.setStatus("Status: Generating Fire Elemental Spell")
main window xaml

<StatusBar DockPanel.Dock="Bottom">
                <TextBlock  x:Name="StatusBar" Text="{Binding Path=StatusBarClass.statusText, Mode=OneWay}"></TextBlock>
Would love any help, and thanks for the great site.

Merry Christmas