Course description
You have a Windows 8 application but you need to add printing and setting functionality. This course will help to fill that need. In this course you will investigate the printing user interface in Windows 8, using the Devices charm. You will learn to register for the Print contract, using the PrintManager object. Then you will see how to work with the RichTextBlock and RichTextBlockOverflow controls to add support for visual text flow layout. Next you’ll see how to examine events of the PrintDocument object, which make it possible to display print preview information and to print content. Then you will see hwo to Print using an in-app button, change options in the standard printing user interface and add custom settings to the printing user interface. Then you will learn about the Settings charm, and the corresponding Settings pane. You will examine settings options for a Weather app. Then install and work with the Callisto library of user interface tools to examine the Permissions Flyout and create a simple About command and Flyout. Then you will learn to add an Options Flyout that supports changing the main page’s background color and preserve settings using the RoamingSettings dictionary.
Prerequisites
This course assumes that students have some programming background and experience using Visual Studio 2010 and C# or Visual Basic. In addition, the course assumes some basic knowledge of XAML markup and basic knowledge of Windows store applications and Windows 8.
Learning Paths
This course will help you prepare for the following certification and exam:
MCSD: Windows Store Apps
70-484: Essentials of Developing Windows Store Apps Using C#
This course is part of the following LearnNowOnline SuccessPaths™:
Building Windows Store Applications
Meet the expert
Ken Getz is a featured instructor for several of our Visual Studio courses. He is a Visual Basic and Visual C# expert and has been recognized multiple times as a Microsoft MVP. Ken is a seasoned instructor, successful consultant, and the author or co-author of several best-selling books. He is a frequent speaker at technical conferences like Tech-Ed, VSLive, and DevConnections and he has written for several of the industry's most-respected publications including Visual Studio Magazine, CoDe Magazine, and MSDN Magazine.
Course outline
Printing
Printing (18:18)
- Introduction (00:41)
- Printing Overview (00:49)
- Using the Charms Bar (00:21)
- Device Listing (00:35)
- Important Note (00:48)
- Device Options (00:26)
- Adding Printing Support (00:35)
- Microsoft Sample (01:03)
- Its Difficult (00:46)
- Registering for Print Contract (00:17)
- Providing Formatted Content (00:20)
- Adding Printing Support (00:21)
- Demo: Printing Not Supported (00:47)
- Displaying Printer Devices (00:12)
- Communicating With Windows (00:37)
- PrintDocument Class (00:53)
- IPrintDocumentSource Interface (00:26)
- PrintManager Class (00:39)
- Registering for Printing (00:33)
- Registering/Unregistering (00:24)
- PrintTaskRequestedEvent (00:39)
- Demo: Overrides (01:57)
- Demo: Register for Printing (00:57)
- Demo: Unregister for Printing (02:33)
- Summary (00:31)
Rich Textblock (42:06)
- Introduction (00:38)
- RichTextBlock Class (00:25)
- RichTextBlockOverFlow Class (00:26)
- Hooking Up Overflow (00:34)
- Showing and Hiding Elements (00:37)
- Demo: Include Printing Content (03:44)
- Demo: Rich Textblock Overflow (04:15)
- Creating Content for Printing (00:27)
- Forcing Layout (01:03)
- Moving Ahead (00:19)
- Collection of Pages (00:41)
- Demo: Adding the Canvas (02:20)
- Hooking up Printing Events (00:21)
- Paginate Event (01:01)
- GetPreviewPage Event (00:33)
- AddPages Event (00:40)
- Laying Out Printing Content (00:40)
- Start with Paginate Event (00:36)
- GetPageDescription Method (00:53)
- Adding One Print Preview Page (01:58)
- ContinuationPage (00:44)
- How to Know Overflow is Done (00:36)
- Demo: Hookup Paginate Event (00:37)
- Demo: Textblock Overflow Code (04:39)
- Demo: Page Width and Height (04:58)
- GetPreviewPage Event (00:28)
- Demo: Hookup GetPreviewPage (04:47)
- AddPages Event (00:35)
- Demo: AddPages Event (01:28)
- Summary (00:49)
Printing In App (22:12)
- Introduction (00:38)
- Print Using In-App Button (00:42)
- Demo: In-App Button (02:04)
- Change Options in Print UI (00:29)
- StandardPrinTaskOptions (00:48)
- Modifying the UI (00:37)
- Steps to Follow (01:10)
- Demo: Modifying Print UI (04:00)
- Creating Custom UI (01:29)
- Example (01:06)
- Demo: Custom UI Element (03:40)
- Demo: Manage Custom UI Element (03:25)
- Summary (02:00)
Charms
Charms (11:07)
- Introduction (00:40)
- App Settings in Windows 8 (00:30)
- Display Settings (00:40)
- Settings Charm (00:57)
- About Option (00:20)
- Permissions Setting (00:19)
- Options/Preferences Flyout (00:43)
- App Settings (00:50)
- Flyouts in Two Sizes (00:19)
- Using the Right Tools (00:32)
- Introducing Callisto (01:04)
- Installing Callisto (00:25)
- Demo: Callisto (00:54)
- Setting Reference to Callisto (00:26)
- Demo: Adding a Reference (01:31)
- Summary (00:48)
Settings (31:25)
- Introduction (00:24)
- What Comes for Free (00:45)
- Demo: Flyout (01:54)
- Creating an About Flyout (00:24)
- Displaying the Flyout (01:05)
- Creating the Setting Command (00:44)
- What's the Action (00:44)
- Displaying the Flyout (00:25)
- Background Color (00:54)
- Demo: Create About Flyout (02:11)
- Demo: Event Handlers (04:57)
- Demo: Run Application (01:02)
- Best Practices (01:11)
- Use Callisto to Avoid Problems (01:02)
- Create a Preferences Flyout (00:20)
- How to Store Preferences (00:40)
- Initializing Values (00:29)
- Initializing Page Values (00:15)
- Add Preferences Pane (00:34)
- Demo: Add Preferences Pane (02:31)
- Demo: Retrieve Background (01:11)
- Demo: Preference Flyout (05:29)
- Demo: Run Application (01:26)
- Summary (00:36)