I have a command that should switch the current view when it's executed. I binded this command to my buttons like this:

```
<Button Style="{StaticResource TextButton}" Command="{Binding ViewModel:MainViewModel.OpenItemCommand}" CommandParameter="{Binding Link}"/>

```

I want to pass Link (the link of the currently selected article) to my command. My command is defined like this:

```
public class Command : ICommand
{
    public event EventHandler CanExecuteChanged;

    readonly Predicate<Object> _canExecute;
    readonly Action<Object> _executeAction;

    public Command(Predicate<Object> canExecute, Action<object> executeAction)
    {
        _canExecute = canExecute;
        _executeAction = executeAction;
    }
    public bool CanExecute(object parameter)
    {
        if (_canExecute != null)
            return _canExecute(parameter);
        return true;
    }

    public void UpdateCanExecuteState()
    {
        if (CanExecuteChanged != null)
            CanExecuteChanged(this, new EventArgs());
    }

    public void Execute(object parameter)
    {
        if (_executeAction != null)
            _executeAction(parameter);
        UpdateCanExecuteState();
    }
}

```

In my ViewModel I have this:

```
public ICommand OpenItemCommand
{
    get
    {
        if (_openItemCommand == null)
        {
            _openItemCommand = new Command.Command(
                p => true,
                p => OpenItem(_HOW_DO_I_GET_THE_PARAMETER?_)
            );
        }
        return _openItemCommand;
    }
    set 
    {
        if (_openItemCommand != value)
        {
            _openItemCommand = value;
            RaisePropertyChanged("OpenItemCommand");
        }
    }
}

private void OpenItem(Uri link)
{
    throw new NotImplementedException();
}

```

When I create the command I need to pass the command parameter (the link) to the Execute method. But how do I get the value of this? I defined the CommandParameter in XAML, but I don't know how to access it.

I really searched through a huge amount of websites but I can't really find the answer.