添加项目文件。
This commit is contained in:
30
Views/MainView.xaml
Normal file
30
Views/MainView.xaml
Normal file
@@ -0,0 +1,30 @@
|
||||
<Window
|
||||
x:Class="PMSWPF.Views.MainView"
|
||||
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:i="http://schemas.microsoft.com/xaml/behaviors"
|
||||
xmlns:local="clr-namespace:PMSWPF.Views"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:vm="clr-namespace:PMSWPF.ViewModels"
|
||||
Title="MainView"
|
||||
Width="800"
|
||||
Height="450"
|
||||
d:DataContext="{d:DesignInstance vm:MainViewModel}"
|
||||
mc:Ignorable="d">
|
||||
<StackPanel>
|
||||
<TextBlock
|
||||
HorizontalAlignment="Center"
|
||||
FontSize="36"
|
||||
Text="{Binding Message}" />
|
||||
|
||||
<Border
|
||||
Width="100"
|
||||
Height="100"
|
||||
Background="Orange">
|
||||
<i:Interaction.Behaviors>
|
||||
<i:MouseDragElementBehavior />
|
||||
</i:Interaction.Behaviors>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</Window>
|
||||
17
Views/MainView.xaml.cs
Normal file
17
Views/MainView.xaml.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System.Windows;
|
||||
using PMSWPF.ViewModels;
|
||||
|
||||
namespace PMSWPF.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// MainView.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class MainView : Window
|
||||
{
|
||||
public MainView()
|
||||
{
|
||||
InitializeComponent();
|
||||
this.DataContext = new MainViewModel();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user