zoukankan      html  css  js  c++  java
  • WPF专业编程指南

    1 <Window x:Class="Chapter1_WpfApplication1.MainWindow"
    2         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    3         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    4         Title="MainWindow" Height="350" Width="525">
    5 </Window>

    1. <Window>代表了一个 XAML 文档的根元素,一个 XAML 文档只能有一个根元素

    2. x:Class 只能有一个,是 Code Behind 的概念代码分离技术的体现,它表示一个“类”,类名是“MainWindow”,在命名空间“Chapter1_WpfApplication1”中

    3. 该 XAML 的默认命名空间是“http://schemas.microsoft.com/winfx/2006/xaml/presentation”,另一个常用命名空间是“http://schemas.microsoft.com/winfx/2006/xaml”,这两个NameSpace合起来就能包含 WPF 所有可使用的对象了

    4. 还可以将两个命名空间合并为一个 XAML 命名空间,方法是在项目中的AssemblyInfo.cs中使用XmlnsDefinition属性:

    1 [assembly:XmlnsDefinition("自定义命名空间","已存在的命名空间1")]
    2 [assembly:XmlnsDefinition("自定义命名空间","已存在的命名空间2")]
  • 相关阅读:
    Redis线程模型理解
    策略模式
    Spring Cloud 5大组件介绍
    单例模式
    hotspot虚拟机的调试
    编译虚拟机jvm——openjdk的编译
    mybatis的搭建和注入spring的方式
    springMvc+hibernate的web application的构建
    关于本博客
    本博客已停更
  • 原文地址:https://www.cnblogs.com/cinlap/p/4468885.html
Copyright © 2011-2022 走看看