Front-end learning my favorite thing is to get a frame--wpf rack up.

Source: Internet
Author: User

It is easy and easy to understand that WPF is the class XML of the label format, which I haven't written yet.

It is said that there are also two other professional front-end WPF editors, but our pure programmers still use vs.

Build a WPF project. There is a window, the window is the most basic empty box for Windows, there is a kind of cement reinforcement of the visual sense.

Then, through the data, understand: Each label is a class, we write tags are writing classes. Labels with different names have different effects and can be understood by the literal meaning. Different tags can be nested, of course, not chaos, but you can try to see the effect of chaos.

<window x:class= "Wpfapplication1.test" xmlns= "http://schemas.microsoft.com/winfx/2006/xaml/presentation"            xmlns:x= "Http://schemas.microsoft.com/winfx/2006/xaml" title= "test" height= "width=" > <Grid> </Grid></Window>

I think it's definitely in the <windows> tag that you want it to appear.

Find and find, find a <Grid> called Grid label. Obviously it is, to draw a grid, similar to the HTML inside the <div>, all the layout depends on it.

Show a look at this buddy is wood content, only is divided into a invisible wood has a border width of the area.

So you have to figure out what your page should be divided into several areas and then give a few tabs.

How about I draw several?

Grid says I have rows and columns, which is much better than <div>.

The

found both the <Grid.Rowdifinctions> and <Grid.Columedifnictions> tags (maybe the words are not written, but don't mind the details). Use them to define the rows and columns separately. It writes a <rowdefinition/> or <columndefinition/> To identify one row or column, and two rows or two columns. A few lines will give a few, there are several columns to give several.

<grid>         <Grid.RowDefinitions>             <RowDefinition />            < rowdefinition />            < rowdefinition />        </grid.rowdefinitions>         <Grid.ColumnDefinitions>             <ColumnDefinition />             <ColumnDefinition />         </grid.columndefinitions>    </grid> 

That's what the code says. Do not give <rowdefinition/> or <columndefinition/> Label Any specifications, they are a few brothers how many split, but must have given one, It takes up so much, no matter how it is, the rest of the Buddies split equally. There's only one man left, and the rest is its own.

What do I do if I want to put it in a row?

Continue to add the tags you want to get in the next place, and then write the grid.row= "I" in its properties, grid.colume= "J", and it will be shown on line I, j column. The sequence numbers are zero-based.

The shelves are painted, but this is only the initial design ah, there is nothing ah. So then, in the <Grid> tag continue to place other can have a display effect of the label or layout style, to enrich your interface.



Front-end learning my favorite thing is to get a frame--wpf rack up.

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.