C# WPF给综合实战项目加个帮助文档

概述

  最近发的好多遍文章都是基于我搭建的Caliburn.Micro框架去叠加开发的,随着内容的增多,后续章节讲的内容,有些朋友没看前面文章的话有些就不好理解了,所以今天我就做了个帮助文档,方便大家有不理解的内容时,快速查看到之前的内容。

界面长啥样

这个功能相对比较单一,就是把与这个项目相关的一些技术文章做了个网页超链接,单击图片位置区域就可以跳转到之前讲解的内容:

界面如下:

ba90bf93f0e42ec9ed70d1e2665f9c5a.png

前台代码

下面展示源码:

前台首先是定义了几个控件的样式,这里没有加键值,即默认全局应用

<UserControl.Resources>
        <Style TargetType="Image">
            <Setter Property="Width" Value="30"/>
            <Setter Property="Height" Value="30"/>
            <Setter Property="Margin" Value="5"/>
</Style>
        <Style TargetType="Label">
            <Setter Property="HorizontalAlignment" Value="Center"/>
            <Setter Property="VerticalAlignment" Value="Center"/>
</Style>
        <Style TargetType="Border">
            <Setter Property="BorderBrush" Value="Yellow"/>
            <Setter Property="BorderThickness" Value="2"/>
            <Setter Property="Background" Value="LightGreen"/>
            <Setter Property="CornerRadius" Value="5"/>
            <Setter Property="Margin" Value="2"/>
</Style>
    </UserControl.Resources>

顶端的说明区域采用Dev的LayoutGroup和LayoutItem实现:

<dxlc:LayoutGroup Orientation="Vertical" View="GroupBox" >
            <dxlc:LayoutGroup.Header>
                <dxlc:LayoutItem Label="Help Documentation" Background="CadetBlue" />
            </dxlc:LayoutGroup.Header>
            <dxlc:LayoutItem Label="Please click the image position to get help documents." />
        </dxlc:LayoutGroup>

下面的每个图片都加了超链接,放在了WrapPanel下,功能都一样,这里只列举第一个的写法:

<Border>
            <StackPanel Orientation="Vertical">
                <Image Source="/Images/build.png" 
                      cal:Message.Attach="[Event MouseLeftButtonUp]=[BuildClick()]" />
                <Label Content="框架搭建"/>
            </StackPanel>
        </Border>

后台代码

后台逻辑基本就是为了响应下鼠标的左键弹起的事件:

public void BuildClick()
        {
           string url = "https://mp.weixin.qq.com/s?__biz=MjM5MjIzMjk4OA==&mid=2247483866&idx=1&sn=73ca9185b2be655d5c965f1600972a03&chksm=a6a822a991dfabbff983d54f358624a7c5e510b7407c50774981a44bd9ada13201b7364bf0b6&token=1300577902&lang=zh_CN#rd";
           Process ie = Process.Start("iexplore.exe",url);
        }

即通过process的start方法去获取并打开文档地址.

源码下载

项目下载下来先还原包,得联网的奥,确保引用的地方没有黄色感叹号,此项目还引用了几个dev的库,确保dev已经安装。

百度网盘下载链接:

https://pan.baidu.com/s/13-qYKaK0AeTVKg-FQrpcaw

提取码:0000

技术群:添加小编微信并备注进群

小编微信:mm1552923   

公众号:dotNet编程大全    

1. 介绍.....................................................................................................................................................................1 1.1 Hello, world...................................................................................................................................................1 1.2 类型...............................................................................................................................................................2 1.2.1 预定义类型............................................................................................................................................3 1.2.2 转换........................................................................................................................................................5 1.2.3 数组类型................................................................................................................................................6 1.2.4 类型系统一致........................................................................................................................................7 1.3 变量和参数...................................................................................................................................................8 1.4 自动内存管理.............................................................................................................................................11 1.5 表达式.........................................................................................................................................................13 1.6 声明.............................................................................................................................................................15 1.7 类.................................................................................................................................................................18 1.7.1 常数......................................................................................................................................................20 1.7.2 域..........................................................................................................................................................20 1.7.3 方法......................................................................................................................................................21 1.7.4 属性......................................................................................................................................................22 1.7.5 事件......................................................................................................................................................23 1.7.6 操作符..................................................................................................................................................24 1.7.7 索引......................................................................................................................................................25 1.7.8 实例构造函数......................................................................................................................................26 1.7.9 析构函数..............................................................................................................................................27 1.7.10 静态构造函数....................................................................................................................................27 1.7.11 继承....................................................................................................................................................28 1.8 结构.............................................................................................................................................................29 1.9 接口.............................................................................................................................................................30 1.10 代表...........................................................................................................................................................31 1.11 联合...........................................................................................................................................................32 1.12 名称空间和集合.......................................................................................................................................32 1.13 版本...........................................................................................................................................................34 1.14 特征...........................................................................................................................................................36 2. 语法结构...........................................................................................................................................................39 2.1 翻译的阶段.................................................................................................................................................39 2.2 文法符号.....................................................................................................................................................39 2.3 预处理.........................................................................................................................................................40 2.3.1 预处理声明..........................................................................................................................................40 2.3.2 #if, #elif, #else, #endif..........................................................................................................................41 2.3.3 预处理控制行......................................................................................................................................42 2.3.4 #line......................................................................................................................................................43 2.3.5 预处理标识符......................................................................................................................................43 2.3.6 预处理表达式......................................................................................................................................43 2.3.7 与空白交互作用..................................................................................................................................44 2.4 语法分析.....................................................................................................................................................45 ……………………
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值