C# 无法使用命令参数绑定值

C# 无法使用命令参数绑定值,c#,wpf,xaml,mvvm,icommand,C#,Wpf,Xaml,Mvvm,Icommand,我需要从我的SubmitCommand中的TextBox标记中获取Text值 但我只得到一个空值。请帮助我了解在我的消息框中显示文本需要做什么 <UserControl> <Grid> <StackPanel Grid.Row="1" Grid.Column="1" Margin="0" FocusManager.Is

我需要从我的
SubmitCommand中的
TextBox
标记中获取
Text
值 但我只得到一个空值。请帮助我了解在我的
消息框中显示文本需要做什么

<UserControl>
   <Grid>
      <StackPanel
         Grid.Row="1"
         Grid.Column="1"
         Margin="0"
         FocusManager.IsFocusScope="true">
         <TextBox
            Name="linkTb"   
            DataContext="{Binding SelectedSite}"                  
            IsManipulationEnabled="True"
            TabIndex="0" />
         <StackPanel                    
            Orientation="Horizontal">
            <Button
               x:Name="submitButton"                        
               Command="{Binding SubmitCommand}"
               CommandParameter="{Binding SelectedSite}"
               Content="Submit"/>
   </Grid>
</UserControl>
此屏幕截图显示我的空
消息框
,其中应包含以下文本:


绑定
文本
属性,并将源属性(
SelectedSite
)的
UpdateSourceTracger
设置为
PropertyChanged
,以便在每次击键时进行设置:

<TextBox
    Name="linkTb"   
    Text="{Binding SelectedSite, UpdateSourceTrigger=PropertyChanged}"                  
    IsManipulationEnabled="True"
    TabIndex="0" />
<TextBox
    Name="linkTb"   
    Text="{Binding SelectedSite, UpdateSourceTrigger=PropertyChanged}"                  
    IsManipulationEnabled="True"
    TabIndex="0" />
CommandParameter="{Binding SelectedSite}"