exam questions

Exam 70-357 All Questions

View all questions & answers for the 70-357 exam

Exam 70-357 topic 1 question 35 discussion

Actual exam question from Microsoft's 70-357
Question #: 35
Topic #: 1
[All 70-357 Questions]

You are developing a Universal Windows Platform (UWP) app that uses XAML and C#. The app must use the Model-View-ViewModel (MVVM) pattern.
The user interface (UI) triggers an event.
You need to bind the event to a view model method.
What should you do?

  • A. Create a custom behavior and attach the behavior to the UI element. Bind the behavior’s event trigger to the command declared in the view model.
  • B. Create an attached property of type ICommand. Bind the UI element’s event to the attached property.
  • C. Assign the value of the DataContext property to the view model. Use the BindingExression.UpdateSource() method to update the data source.
  • D. Add a strongly-typed view model property to the view. In the code behind file for the view, invoke the view model method.
Show Suggested Answer Hide Answer
Suggested Answer: Explanation 🗳️
Commands are an implementation of the ICommand interface that is part of the .NET Framework. This interface is used a lot in MVVM applications.
Reference: https://msdn.microsoft.com/en-us/magazine/dn237302.aspx

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
jacclc
Highly Voted 5 years, 5 months ago
Answer: B
upvoted 9 times
...
Itu
Most Recent 4 years, 4 months ago
Answer is B
upvoted 2 times
...
liconnotalo
5 years, 7 months ago
Which is the answer?
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago