https://github.com/sonnemaf/mvutest
Model-View-Update (MVU) design pattern for UWP apps
https://github.com/sonnemaf/mvutest
csharp design-pattern model-view-update uwp uwp-apps xaml
Last synced: 10 months ago
JSON representation
Model-View-Update (MVU) design pattern for UWP apps
- Host: GitHub
- URL: https://github.com/sonnemaf/mvutest
- Owner: sonnemaf
- Created: 2020-05-28T09:31:17.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-07-16T14:22:17.000Z (almost 6 years ago)
- Last Synced: 2025-05-24T19:43:45.998Z (about 1 year ago)
- Topics: csharp, design-pattern, model-view-update, uwp, uwp-apps, xaml
- Language: C#
- Homepage:
- Size: 34.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Model-View-Update (MVU) design pattern for UWP apps
```
using MvuTest.Controls;
using System;
using Windows.UI;
using Windows.UI.Popups;
using Windows.UI.Xaml;
namespace MvuTest {
public class MainPage : MvuPage {
private TextBlock2 _tb;
private int _count;
protected override IUIElement2 Build() =>
this.StackPanel(
this.ToggleButton("Toggle it")
.Width(200)
.FontSize(30),
this.Button("Increment", (sender, e) => {
_tb.Text($"Count {++_count}");
}).HorizontalAlignment(HorizontalAlignment.Center),
(_tb = this.TextBlock("Count 0"))
.FontSize(20)
.Foreground(Colors.Red),
this.TextBox("Fons Sonnemans")
.Header("Name")
).Spacing(12)
.HorizontalAlignment(HorizontalAlignment.Center)
.VerticalAlignment(VerticalAlignment.Center);
}
}
```