Add MvvmLight Template

This commit is contained in:
筱傑
2019-08-02 16:19:14 +08:00
committed by GitHub
parent 15b87f4685
commit ba24c4ea0f
13 changed files with 531 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
<Window
x:Class="MvvmLightDemo.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:MvvmLightDemo"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="MainWindow"
Width="800"
Height="450"
WindowStartupLocation="CenterScreen"
mc:Ignorable="d">
<Window.DataContext>
<Binding Path="Main" Source="{StaticResource Locator}" />
</Window.DataContext>
<Grid>
<TextBlock
Margin="0,0,0,100"
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="20"
Text="{Binding Title}" />
<Button
Padding="10"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Command="{Binding ChangeTitleCommand}"
Content="Click Me!" />
</Grid>
</Window>