Programming Windows: Writing Windows 8 Apps With C# and XAML (Developer Reference)

Programming Windows: Writing Windows 8 Apps With C# and XAML (Developer Reference)

Charles Petzold

Language: English

Pages: 1136

ISBN: 0735671761

Format: PDF / Kindle (mobi) / ePub


Reimagined for full-screen and touch-optimized apps, Windows 8 provides a platform for reaching new users in new ways. In response, programming legend Charles Petzold is rewriting his classic Programming Windows—one of the most popular programming books of all time—to show developers how to use existing skills and tools to build Windows 8 apps.

Programming Windows, Sixth Edition focuses on creating Windows 8 apps accessing the Windows Runtime with XAML and C#. The book also provides C++ code samples. The Sixth Edition is organized in two parts:

  • Part I, “Elementals,” begins with the interrelationship between code and XAML, basic event handling, dynamic layout, controls, templates, asynchronous processing, the application bar, control customization, and collections. You should emerge from Part I ready to create sophisticated page-oriented collection-based user interfaces using the powerful ListView and GridView controls.
  • Part II, “Specialties,” explores topics you might not need for every program but are essential to a well-rounded education in Windows 8. These include multitouch, bitmap graphics, interfacing with share and search facilities, printing, working with the sensors (GPS and orientation), text, obtaining input from the stylus (including handwriting recognition), accessing web services, calling Win32 and DirectX functions, and bringing your application to the Windows 8 app store.

 

 

 

 

 

 

 

 

 

 

project: HelloLocalImage, for example. It’s common to store bitmaps used by a project in a directory named Images. In the Solution Explorer, right-click the project name and choose Add and New Folder. (Or, if the project is selected in the Solution Explorer, pick New Folder from the Project menu.) Give the folder a name such as Images. Now right-click the Images folder and choose Add and Existing Item. Navigate to the Greeting.png file you saved and click the Add button. Once the file is added to

system: X values increase to the right and Y values increase going down. The relative point (0, 0) is the upper-left corner and (1, 0) is the upper-right corner, so the brush gradient extends along an imaginary line between these two points, and all lines parallel to that line. The StartPoint and EndPoint defaults are (0, 0) and (1, 1), which defines a gradient from the upper-left to the lower-right corners of the target object. LinearGradientBrush also has a property named GradientStops that is

changes true to false and false to true. The ScrollViewer Solution What happens if there are too many elements for StackPanel to display on the screen? In real life, that situation occurs quite often and it’s why a StackPanel with more than just a few elements is almost always put inside a ScrollViewer. The ScrollViewer has a property named Content that you can set to anything that might be too large to display in the space allowed for it—a single large Image, for example. ScrollViewer provides

the point where you touch the Slider or drag your finger or mouse. The Value property of the Slider can change either programmatically or through user manipulation. To obtain a notification when the Value property changes, attach an event handler for the ValueChanged event, such as shown in the SliderEvents project: Project: SliderEvents | File: BlankPage.xaml (excerpt)

such as “click” when referring to Visual Studio, but I’ll switch to touch terminology such as “tap” for the applications you’ll be creating. A version of Visual Studio that is optimized for touch is probably at least a few years away.) Visual Studio creates a solution named Hello and a project within that solution named Hello, as well as a bunch of files in the Hello project. These files are listed in the Solution Explorer on the far right of the Visual Studio screen. Every Visual Studio solution

Download sample

Download