WPF learning notes (XAML) and wpf learning notes (xaml)

Source: Internet
Author: User

WPF learning notes (XAML) and wpf learning notes (xaml)

Introduction

This is my first time writing an article in the courtyard. I have been working on some projects for a year and a half, but I really feel that there are too few things and the basic notes are poor. Recently I want to learn something, write more articles to encourage yourself to keep learning.

As you are preparing to use WPF to build a project, the driver must first learn the knowledge of XAML. At the same time, XAML can be applied to the development of WEB applications and mobile applications, so it has the value of learning.

Summary.

Next, let's start with the topic to write about the XAML learning over the past few days.

Summary

Extensible Application Markup Language (XAML) is a declarative Language that separates UI from logical code and inherits XML syntax rules, the namespace introduces special tags to expand the application.

Generally, XAML maps to. net classes.

The declaration of Element in xaml is the instantiation of A. net class.

Starting our XAML learning from helloWorld

XAML code

<Window x:Class="WpfApplication1.Window3"        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"        Title="Window3" Height="300" Width="300">    <Grid>        <Label Content="helloworld" />    </Grid></Window>

 

C # code

 var l = new Label(); l.Content = "helloWorld";

Postscript

Writing for the first time is a little slow, and it will take a long time to continue writing tomorrow. Because learning is always halfway done, it is difficult to write the beginning, it's not easy to end with a perfect ending. I hope I want to learn it like I do. NET friends learn together, encourage each other, and supervise each other. If something is wrong, I hope you can give more advice.

  

  

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.