Learn your way! Get started

Windows 8 Using XAML, Part 11: String and Image Resources

with expert Ken Getz


Watch trailer


Course at a glance

Included in these subscriptions:

  • Dev & IT Pro Video
  • Dev & IT Pro Power Pack

Release date 3/11/2013
Level Intermediate
Runtime 1h 44m
Closed captioning N/A
Transcript N/A
eBooks / courseware Included
Hands-on labs Included
Sample code Included
Exams Included


Enterprise Solutions

Need reporting, custom learning tracks, or SCORM? Learn More



Course description

Working with resources in Windows 8 is just as important as previous versions. In this course you will learn to work with string resources to factor text out of applications. You will also learn to support text localization through the use of resource files and load resources using the design-time x:Uid property, and programmatically. You will also see how to use multiple resource files; load resources from a resource assembly. Next you will learn how to react to language changes, and override the preferred language. Then you will see how to work with image resources, handling localization and scaling, use Visual Studio’s designer for logo images, and load correctly scaled images programmatically.

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



Resources

String Resources (39:25)
  • Introduction (00:35)
  • Working with String Resources (00:20)
  • Resources in .NET Framework (00:25)
  • Resources in Windows Store Apps (00:48)
  • Creating Resources (01:41)
  • Using Visual Studio (00:39)
  • Naming Resources (00:22)
  • Languages (00:45)
  • Naming Resources (00:51)
  • Getting Started (00:13)
  • Steps (00:50)
  • Creating Folders (00:25)
  • Create Resources (00:25)
  • Associate Control and Resource (00:21)
  • Resources in Code (01:01)
  • Demo: Creating Resources (03:14)
  • Demo: Using a Resource (03:46)
  • Demo: More on Resources (01:15)
  • Globalization (00:58)
  • Simple Translations (01:16)
  • Demo: Translations (03:37)
  • Naming Files and Folders (01:28)
  • Demo: A Third Language (01:42)
  • Using Resources in Manifest (00:54)
  • Demo: Resources in Manifest (02:18)
  • Multiple Resource Files (01:05)
  • Demo: Errors (02:08)
  • Demo: Displaying Errors (04:59)
  • Summary (00:49)
More Resources (35:26)
  • Introduction (01:39)
  • Storing in Resource Assembly (00:58)
  • Demo: External Resource (04:49)
  • Language-Change Events (00:33)
  • Listening for Language Change (02:41)
  • Handling Language Change (01:49)
  • Demo: Handling Language Change (03:24)
  • Demo: Async Event Handler (03:50)
  • Retrieve Info About Languages (00:44)
  • Demo: Retrieving Language Info (03:43)
  • Override Language Settings (00:22)
  • Digging Deeper into Resources (01:23)
  • Demo: Resource Context (04:55)
  • Resource Fallback (01:28)
  • Demo: Resource Fallback (02:02)
  • Summary (00:59)
Image Resources (29:25)
  • Introduction (00:45)
  • Working with Image Resources (00:24)
  • Scaling to Pixel Density (00:33)
  • Effects of Scaling (01:03)
  • Scaling Rules (00:44)
  • Making Scaling Work (00:18)
  • Naming Files (01:18)
  • Working with Images (00:49)
  • Suggested Layout (00:46)
  • Creating Folder Structure (01:05)
  • Scaling Tips (00:49)
  • Scale Down, Not Up (00:39)
  • Sample Images (01:08)
  • Demo: Using Scaled Images (04:38)
  • Logos for Start Screen (00:32)
  • Working with Logos (00:31)
  • Using Visual Studio (02:10)
  • Handling Contrast (00:23)
  • Demo: Working with Logos (03:48)
  • Loading Images at Runtime (00:51)
  • Demo: Load Images at Runetime (05:01)
  • Summary (01:00)