mirror of
https://github.com/jie65535/Helpers.git
synced 2025-12-15 19:02:41 +08:00
Add MvvmLight Template
This commit is contained in:
30
MvvmLightDemo/MainWindow.xaml
Normal file
30
MvvmLightDemo/MainWindow.xaml
Normal 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>
|
||||
Reference in New Issue
Block a user