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.