XAML基础

作者: 落地成佛 | 来源:发表于2019-10-11 08:58 被阅读0次

一、概述

WPF前端采用XAML标记语言,XAML比以前的Winform控件模式益处在于前后端分离,丰富的UI

二、基础介绍

2.1 xmls名称空间

2.1.1 xmlns概述

//新建WPF后默认生成的XAML页面如下:
<Window x:Class="WpfApplication1.MainWindow"//后台代码cs文件
        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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:WpfApplication1"
        mc:Ignorable="d"
        Title="MainWindow" Height="350" Width="525">
    <Grid>
    </Grid>
</Window>

2.1.2 presentation名称空间详细

  • 图片.png

2.1.3 x名称空间详细

图片.png

相关文章

网友评论

    本文标题:XAML基础

    本文链接:https://www.haomeiwen.com/subject/ilegkctx.html