wpf command parameter from other object
You can do this by setting the ElementName
in the binding.
Here's an example:
<TextBox x:Name="textBox"/>
<Button Content="Button"
Command="{Binding ButtonCommand}"
CommandParameter="{Binding ElementName=textBox, Path=Text}"/>
The following XAML should work to pass the Text from the TextBox as Parameter to your command.
<TextBlock x:Name="searchBox" />
<Button Command="{Binding MyButtonInViewModel}"
CommandParameter="{Binding Text, ElementName=searchBox}"/>