C# wpf文本块绑定不工作

C# wpf文本块绑定不工作,c#,wpf,C#,Wpf,我是WPF编程新手,所以如果这是一个简单的问题,请原谅我 我的main窗口.xaml设置如下: <Window x:Class="GNMAwpf.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:GN

我是WPF编程新手,所以如果这是一个简单的问题,请原谅我

我的
main窗口.xaml设置如下:

<Window x:Class="GNMAwpf.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:GNMAwpf"
    Title="Uploader" 
    Height="353" Width="342" ResizeMode="NoResize" WindowStartupLocation="CenterScreen">

<Window.DataContext>
    <local:GinniNet x:Name="g" />
</Window.DataContext>
当我更改
StatusMessage
时,文本块永远不会更新。我哪里出错了?

绑定不正确-

<TextBlock Text="{Binding Path=StatusText}"/>

应该是-

<TextBlock Text="{Binding Path=StatusMessage}"
绑定不正确-

<TextBlock Text="{Binding Path=StatusText}"/>

应该是-

<TextBlock Text="{Binding Path=StatusMessage}"