CommandParameter与ListView命令绑定无关

Nut*_*uts 3 wpf listview commandbinding commandparameter

我没有成功从ListView项发送CommandParameter.我的代码如下.

<ListView x:Name="myList" ItemsSource="{Binding MyData}"                        
     <ListView.View>
          <GridView>
               <GridViewColumn>
                    <GridViewColumn.CellTemplate>
                          <DataTemplate>
                                <Button Command="{Binding Path=DataContext.MyCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Window}}}" CommandParameter="{Binding SelectedItem, ElementName=myList}" >
                                      <Button.Content>
                                            <StackPanel Orientation="Horizontal">
                                                <TextBlock Text="{Binding Path=SomeValue}" />
                                            </StackPanel>      
                                      </Button.Content>
                                 </Button>
                           </DataTemplate>   
                      </GridViewColumn.CellTemplate>
               </GridViewColumn>
          </GridView>
     </ListView.View>
</ListView>
Run Code Online (Sandbox Code Playgroud)

单击ListView上的项目时,该命令被称为okay,但CommandParameter显示Nothing.这有什么问题?

ViewModel命令在这里:

Public ReadOnly Property MyData As List(Of myObject)
    Get
        Return _myObjectrepo.GetAll()
    End Get 
End Property

Public Property MyCommand As ICommand
    Get
        If _myCommand Is Nothing Then
            _myCommand = New RelayCommandWithParameter(Of myObject)(AddressOf Navigate)
        End If
        Return _myCommand 
    End Get
    Set(value As ICommand)
        _myCommand = value
    End Set
End Property
Private _myCommand As ICommand
Run Code Online (Sandbox Code Playgroud)

...以及我尝试使用CommandParameter的过程

Private Sub Navigate(m As myObject)
    If m IsNot Nothing Then

    End If
End Sub
Run Code Online (Sandbox Code Playgroud)

......但是m在上述程序中是没有的.

Nut*_*uts 8

复制了评论中的答案:

CommandParameter="{Binding}" 
Run Code Online (Sandbox Code Playgroud)