MVVM 开源项目教程

MVVM 开源项目教程

MvvmMVVM helpers, including calculated properties and asynchronous notification tasks.项目地址:https://gitcode.com/gh_mirrors/mvvm7/Mvvm

1. 项目的目录结构及介绍

Mvvm/
├── src/
│   ├── Mvvm/
│   │   ├── Commands/
│   │   │   ├── AsyncCommand.cs
│   │   │   ├── AsyncCommandBase.cs
│   │   │   ├── ...
│   │   ├── Common/
│   │   │   ├── NotifyTaskCompletion.cs
│   │   │   ├── ...
│   │   ├── Properties/
│   │   │   ├── AssemblyInfo.cs
│   │   ├── ViewModels/
│   │   │   ├── MainViewModel.cs
│   │   │   ├── ...
│   │   ├── App.xaml
│   │   ├── App.xaml.cs
│   │   ├── MainWindow.xaml
│   │   ├── MainWindow.xaml.cs
│   ├── Mvvm.Tests/
│   │   ├── Properties/
│   │   │   ├── AssemblyInfo.cs
│   │   ├── AsyncCommandTests.cs
│   │   ├── ...
├── .gitignore
├── Mvvm.sln
├── README.md

目录结构介绍

  • src/Mvvm/:项目的主要代码文件夹。

    • Commands/:包含异步命令相关的类。
    • Common/:包含通用辅助类。
    • Properties/:包含程序集信息文件。
    • ViewModels/:包含视图模型类。
    • App.xamlApp.xaml.cs:应用程序的入口文件。
    • MainWindow.xamlMainWindow.xaml.cs:主窗口的定义文件。
  • src/Mvvm.Tests/:包含项目的单元测试文件。

    • Properties/:包含测试程序集信息文件。
    • AsyncCommandTests.cs:异步命令的测试文件。
  • .gitignore:Git 忽略文件配置。

  • Mvvm.sln:Visual Studio 解决方案文件。

  • README.md:项目说明文档。

2. 项目的启动文件介绍

App.xaml

<Application x:Class="Mvvm.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             StartupUri="MainWindow.xaml">
</Application>

App.xaml.cs

namespace Mvvm
{
    public partial class App : Application
    {
    }
}

启动文件介绍

  • App.xaml:定义了应用程序的入口点,并指定了启动时加载的窗口 MainWindow.xaml
  • App.xaml.cs:应用程序的代码隐藏文件,通常用于处理应用程序级别的事件和逻辑。

3. 项目的配置文件介绍

App.config

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <startup> 
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
  </startup>
</configuration>

配置文件介绍

  • App.config:应用程序的配置文件,通常用于指定运行时环境和框架版本。

以上是 MVVM 开源项目的目录结构、启动文件和配置文件的介绍。希望这些内容能帮助你更好地理解和使用该项目。

MvvmMVVM helpers, including calculated properties and asynchronous notification tasks.项目地址:https://gitcode.com/gh_mirrors/mvvm7/Mvvm

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

贾方能

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值