1. Trang chủ
  2. » Công Nghệ Thông Tin

apress windows 8 apps revealed, using xaml and c# (2012)

130 1,4K 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 130
Dung lượng 5,69 MB

Nội dung

Cuốn sách hướng dẫn sử dụng window 8 cho dân mới sử dụng.Đặc biết đây là cuốn sách hướng dẫn lập trình trên win 8 cho người thích học về công nghệ thông tin.

[...]... MainPage .xaml. cs File using System; using System.Collections.Generic; using System.IO; using System.Linq; using Windows. Foundation; using Windows. Foundation.Collections; using Windows. UI .Xaml; using Windows. UI .Xaml. Controls; using Windows. UI .Xaml. Controls.Primitives; using Windows. UI .Xaml. Data; using Windows. UI .Xaml. Input; using Windows. UI .Xaml. Media; using Windows. UI .Xaml. Navigation;    namespace GrocerApp... interesting and is shown in Listing 1-3 (For brevity, I have removed some of the comments that Visual Studio adds to this file.) 8 CHAPTER 1 ■ GETTInG STARTEd Listing 1-3 The App .xaml. cs File using using using using using using using using using using using using using using using System; System.Collections.Generic; System.IO; System.Linq; Windows. ApplicationModel; Windows. ApplicationModel.Activation; Windows. Foundation;... have XAML experience, as shown in Listing 1-5 ■■Tip Don’t worry about the XAML and code-behind files for the moment; I provide a quick overview later in this chapter Listing 1-5.  The Contents of the MainPage .xaml. cs File using System; using System.Collections.Generic; using System.IO; using System.Linq; using Windows. Foundation; using Windows. Foundation.Collections; using Windows. UI .Xaml; using Windows. UI .Xaml. Controls;... using System.Linq; using Windows. Foundation; using Windows. Foundation.Collections; using Windows. UI .Xaml; using Windows. UI .Xaml. Controls; using Windows. UI .Xaml. Controls.Primitives; using Windows. UI .Xaml. Data; using Windows. UI .Xaml. Input; using Windows. UI .Xaml. Media; using Windows. UI .Xaml. Navigation;   namespace GrocerApp { public sealed partial class MainPage : Page { public MainPage() { this.InitializeComponent();... System.IO; System.Linq; Windows. ApplicationModel; Windows. ApplicationModel.Activation; Windows. Foundation; Windows. Foundation.Collections; Windows. UI .Xaml; Windows. UI .Xaml. Controls; Windows. UI .Xaml. Controls.Primitives; Windows. UI .Xaml. Data; Windows. UI .Xaml. Input; Windows. UI .Xaml. Media; Windows. UI .Xaml. Navigation; namespace GrocerApp { sealed partial class App : Application { public App() { this.InitializeComponent();... would a regular C# project You can force the debugger to break by setting breakpoints in the source code; aside from the use of the simulator, running and debugging a Windows app uses the standard Visual Studio facilities Summary In this chapter, I provided an overview of this book and introduced the basics of a Windows app written using XAML and C# I provided a very basic overview of XAML and showed you... shown in Listing 2-3 Listing 2-3.  Updating App .xaml. cs to Use the ListPage using System; using Windows. ApplicationModel; using Windows. ApplicationModel.Activation; using Windows. UI .Xaml; using Windows. UI .Xaml. Controls;   namespace GrocerApp {   sealed partial class App : Application {   public App() { 25 CHAPTER 2 ■ Data, Binding, and Pages this.InitializeComponent(); this.Suspendin += OnSuspending; }... define and configure controls in XAML, the code-behind C# class, or both The simplest way of demonstrating this relationship is to show you the implementation of the event handler that I specified for the Button elements in the XAML file Listing 1 -8 shows the MainPage .xaml. cs file, which is the code-behind file for MainPage .xaml 15 CHAPTER 1 ■ Getting Started Listing 1 -8.   The MainPage .xaml. cs File using. .. pop-up menu, and selecting the Blank Page template Visual Studio creates the XAML file and the code-behind file, ListPage .xaml. cs ■■Tip If you are new to building apps using XAML, then it is important to understand that you wouldn’t usually work in the order in which I described the example app Instead, the XAML approach supports a more iterative style where you declare some controls using XAML, add some... together and what the important files are Windows apps use a slimmed-down version of the NET Framework library You can see which namespaces are available by double-clicking the Net for Windows Store apps item in the References section of the Solution Explorer Exploring the App .xaml File The App .xaml file and its code-behind file, App .xaml. cs, are used to start the Windows app The main use for the XAML . Windows. Foundation.Collections; using Windows. UI .Xaml; using Windows. UI .Xaml. Controls; using Windows. UI .Xaml. Controls.Primitives; using Windows. UI .Xaml. Data; using Windows. UI .Xaml. Input; using. Windows. ApplicationModel.Activation; using Windows. Foundation; using Windows. Foundation.Collections; using Windows. UI .Xaml; using Windows. UI .Xaml. Controls; using Windows. UI .Xaml. Controls.Primitives; using

Ngày đăng: 15/03/2014, 09:36

TỪ KHÓA LIÊN QUAN