MVVM Light RelayCommand Parameters

后端 未结 3 1485
[愿得一人]
[愿得一人] 2020-11-29 06:11

I\'m having an issue with passing a parameter to a relaycommand using the GalaSoft MVVM Light framework. I know that mvvm light\'s implementation of relaycommand doesn\'t u

3条回答
  •  醉梦人生
    2020-11-29 06:48

    Another way to declare relay commands, will help to reduce your code

    public RelayCommand ChartCommand
    {
        set
        {
            RelayCommand chartCommand = 
                new RelayCommand(e => ExecuteChartCommand(e));               
        }
    }
    
    public void ExecuteChartCommand(string vendor)
    {
    
    }
    

提交回复
热议问题