Skip to content

Commit b03a351

Browse files
committed
docs: Adding context about MainViewModel in Counter app variants XAML/MVUX and C#/MVUX + typo fix
1 parent 0628218 commit b03a351

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

doc/articles/getting-started/counterapp/get-started-counter-csharp-mvux.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ Also, for more information on all the template options, see [Using the Uno Platf
8989

9090
## Data Binding
9191

92-
Now that we have the **`MainModel`** class, we can update the **`MainPage`** to use data binding to connect the UI to the application logic.
92+
As the application uses MVUX, the `MainModel` class is used to generate a bindable ViewModel, `MainViewModel`. We can update the **`MainPage`** to use data binding to connect the UI to the application logic.
9393

9494
- Let's add the **`DataContext`** to our page. To do so, add `.DataContext(new MainViewModel(), (page, vm) => page` before `.Background(...)`. Remember to close the **`DataContext`** expression with a `)` at the end of the code. It should look similar to the code below:
9595

doc/articles/getting-started/counterapp/get-started-counter-xaml-mvux.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ Also, for more information on all the template options, see [Using the Uno Platf
8989

9090
## Data Binding
9191

92-
Now that we have the **`MainModel`** class, we can update the **`MainPage`** to use data binding to connect the UI to the application logic.
92+
As the application uses MVUX, the `MainModel` class is used to generate a bindable ViewModel, `MainViewModel`. We can update the **`MainPage`** to use data binding to connect the UI to the application logic.
9393

9494
- Add a **`DataContext`** element to the **`Page`** element in the **MainPage.xaml** file.
9595

doc/articles/getting-started/counterapp/get-started-counter-xaml-mvvm.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ Now that we have the **`MainViewModel`** class, we can update the **`MainPage`**
119119
TextAlignment="Center" />
120120
```
121121

122-
- Add a new **`Button`** with a **`Command`** attribute that is bound to the **`IncrementCommand`** property of the **`MainViewModel`**.
122+
- Update the **`Button`** by adding a **`Command`** attribute that is bound to the **`IncrementCommand`** property of the **`MainViewModel`**.
123123

124124
```xml
125125
<Button Margin="12"

0 commit comments

Comments
 (0)