Development readiness for Windows app development

Source: Internet
Author: User
Tags old windows silverlight

Operating system and SDK operating system

Obvious. You want to develop Windows apps on Windows 8/8.1/10. The old Windows XP/VISTA/7 has not been able to meet the needs of the times.

Of course. In the course of the development of Windows apps, there is a great change in itself, and it is recommended to use Windows 10 in order to use the new features. When I was writing this tutorial. The Windows 10 release is not available, so the new features on Windows 10 are not covered temporarily and will continue to be updated, and you are welcome to continue.

Operating system In addition to the official website download. can also be downloaded in DreamSpark and other places. Other Microsoft operating systems, development tools, and other software on DreamSpark are available to students free of charge.

Visual Studio

The Visual Studio family is the most powerful IDE on the planet. Learning Windows App Development is a natural and indispensable.

In addition, because the main direction of this blog series is Windows App (formerly known as universal Windows app, referred to as UWA), so I use the SDK is still preview version--visual Studio [CTP 6].

Installation troubleshooting

When you install Visual Studio 2013/2015, a blue screen appears, and the NIC driver is uninstalled and installed again. This is especially true of the previous version of Visual Studio 2013 and the use of a campus telecommunications network.

I'll update here if you're going to be able to mail me any problems you've encountered, found or not found. My e-mail is [email protected].

Windows app Simple Introduction to C #

C # is a Microsoft-driven programming language and the most appropriate development language for Windows apps, so this tutorial is unified in C #.

Develop Windows apps. Ability to use combinations of Windows XAML (C #, C + + and VB), WinJS (Html+javascript), DirectX (c + +), and more. Silverlight (C # and VB) is unique to WP, Silverlight has been basically eliminated, it is recommended to use C#+XAML to develop, in game development and image processing, C + + is more advantageous.

Xaml

Extensible Application Markup Language (abbreviated as XAML, pronounced Zamel) is part of WPF. Their syntax is similar to HTML, and they are all "markup languages."

I'm the first to learn the HTML of the XAML. In the beginning, I liked the language very much-it didn't have a lot of "." ”。 XAML essentially belongs to a. NET programming language that belongs to the common language execution (Common Language runtime. Referred to as the CLR).

See a lot of tutorials and so on at the beginning of the description of the xmlns and other namespaces, I think this is not appropriate, after all, it is not used at all, and therefore cannot remember. You'll be impressed when you need to.

General application

In fact, I think the name "Universal application" is obviously more appropriate. More side-heavy "universal" features. It can be executed on all Windows platforms, not just PCs, tablets, phones. There's even an Xbox.

The ability to share most of the code on multiple platforms, enabling it to be developed at once and executed on multiple platforms.

Despite the cross-platform that everyone is doing. But I'm pretty optimistic about the concept of general application. There have been rumors that Windows 10 is compatible with Android apps, and at the Microsoft Build Conference, Microsoft announced that it was porting the Android app to the Windows platform with great ease and speed. Even so, because of the great differences in the design style of the application, the feature fades. And let's wait and see if the free upgrade program for Windows 10 can drive the development of the mobile version through the desktop version.

Create your first app new project

Assuming it's not a solid state then the installation process will be very long, please wait patiently.

You can start the work after you've installed it.

Ctrl+shift+n call out the new project form directly.

After the new is completed, the workaround manager will be such as the following interface:

Assuming that the solution manager is not displayed, you can press ctrl+w,s. Or you can click View in the top toolbar. Right-click on solution ' WindowsApp1 ' to continue with the creation of the second project.

As seen in the. Together, we have 3 parts:
1) windowsapp1.windows (Windows 8.1)
2) Windowsapp1.windowsphone (Windows Phone 8.1)
Obviously both of these are Windows 8.1 and Windows Phone 8.1 parts in Windows apps respectively. The following are also:
Properties: Apply some of the relevant version number and so on.
References: Reference. It is mainly used to refer to the third party's stuff. Advertising, for example.


Assets: The ability to put the resources used by the app in this directory.
The MainPage.xaml:XAML code is written here. C # code needs to be written in the MainPage.xaml.cs file that appears after clicking on the triangle to the left of MainPage.xaml.
Package.appxmanifest: Some of the list of application packages, which are later used in detail.
The remaining one is the relevant certificate.
3) windowsapp1.shared
This is the essence of Windows app (universal application), such as the ability to put classes, resource files and so on here.

Debug program

Here you can set up a debug Windows 8.1 app or a Windows Phone 8.1 app.

Here you can choose to debug in a native debug or virtual machine.

Hands-on Operation

Write down the following code in MAINPAGE.XAML:

<Grid Background="{ThemeResource Applicationpagebackgroundthemebrush}"> <textblock name="Tblock" Text="" FontSize=" the"Foreground="Red"margin="173,78,940,498"/> <ButtonName="BTN"Content="Show name"click="Btn_click"Width="155" FontSize="very"height=" the"margin="170,286,0,392"/> </Grid>

Using only two TextBlock and button two controls, the properties are:
Name: Control names
Text:textblock the text displayed by the control
FontSize: Font
Width and Height: width and height
Margin: Margin, detailed use in the following blog will be introduced
Content: Contents, which appears on the button control
Foreground: Font Color

Another event:
Click: Tap Events

Double-click Btn_click with the mouse and press F12 to generate the corresponding function in C # file at high speed.

You can then debug on the local computer or on the virtual machine.

Visual Studio uses small trick line numbers

I see a lot of children's shoes vs none to turn on line numbers. and the ability to see how many lines of code you have written will undoubtedly make you feel more fulfilled.

Click Tools on the toolbar, then click Options, click the Text editor, select all Language, and check the uplink number to make it tick-and-run.).

Shortcut keys

Take the initiative to align yourself: ctrl+k,ctrl+f
Gaze code: Ctrl+e. CTRL + C
(Or: Ctrl+k,ctrl+c)
Clear code gaze: ctrl+e. Ctrl+u
(Or: Ctrl+k. CTRL+U)

View

1) When learning to develop, the "Object Browser" in the view is very practical.


2) The ability to pull the controls in the toolbox directly into the MainPage.xaml designer. This is the legendary "WYSIWYG".


3) Properties, click on a space and click on Properties view. The ability to set its properties and events.

Designer

Place the mouse pointer over the designer, hold down the CTRL key, and then scroll with the mouse to zoom in or out of the view.

When the mouse wheel scrolls back and forth. The form in the designer moves up or down. If you hold down SHIFT, you will move left and right.

The same is also put the mouse pointer in the designer, install space (that is, the space) key, the pointer will become a small hand. You can move the designer at this point.

If you have many other suggestions. Welcome email me.

Development readiness for Windows app development

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.