Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class QuestionsVM
- {
- public ObservableCollection<QuestionVM> Questions { get; set; } = new ObservableCollection<QuestionVM>();
- public void AddQ()
- => Questions.Add(new QuestionVM(this));
- }
- class QuestionVM
- {
- public QuestionVM(QuestionsVM obj)
- {
- AddNewItem = new RelayCommand<object>(o => obj.AddQ());
- }
- public ICommand AddNewItem { get; set; }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement