How to set SelectedItem on a RibbonComboBox using MVVM?

后端 未结 1 1357
我寻月下人不归
我寻月下人不归 2021-01-20 11:50

How do I set the SelectedItem on a RibbonComboBox using MVVM pattern?

View



        
相关标签:
1条回答
  • 2021-01-20 12:28

    I solved it by changing the constructor.

    // Constructor
    public FoobarViewModel(MyObject myObject)
    {
        LoadFoobars();
    
        Foobar = _repository.GetFoobar(myObject.FoobarID);
    }
    
    0 讨论(0)
提交回复
热议问题