c# wpf mvvm light as convey object sender in event



  • Is there devexpress grid control in one column of which comboBox listens to SelectionChanged by interaction and eventToCommand, but I don't know how to get comboBox (object sender) to determine the line where the comboBox is to receive it, the element that bundles up to row, the point is, how to trace the changes in the specific id line (sbo)



  • xaml:

    <i:Interaction.Triggers>
      <i:EventTrigger EventName="SelectionChanged">
         <cmd:EventToCommand Command="{Binding ComboChanged, Source={StaticSource vm}}" 
            PassEventArgsToCommand="True" />
      </i:EventTrigger>
    </i:Interaction.Triggers>
    

    viewModel:

    public RelayCommand<SelectionChangedEventArgs> ComboChanged { get; set; }
    public ViewModel() //ctor
    {
        ComboChanged = new RelayCommand<SelectionChangedEventArgs>(HandleComboChanged);
    }
    private void HandleComboChanged (SelectionChangedEventArgs a)
    {
        //(Combobox)a.Source
    }
    



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2