Microsoft Provides Sample Features and APIs for Universal Windows Apps
|Stuart Parkerson in Windows Mobile Wednesday, September 30, 2015|
To help developers learn app development for the Universal Windows Platform (UWP), Microsoft has made available a growing samples collection on GitHub. These samples can be used to learn about specific UWP features and APIs and as a source of working code that can be copied and pasted into projects.
API and Feature Samples
The API and feature samples collection covers numerous scenarios ranging across the entire platform. There are over 190 samples which are divided into these categories:
- App settings
- Audio, video, and camera
- Contacts and calendar
- Controls, layout, and text
- Custom user interactions
- Deep links and app-to-app communication
- Devices and sensors
- Files, folders, and libraries
- Globalization and localization
- Graphics and animation
- Identity, security, and encryption
- Launching and background tasks
- Maps and location
- Networking and web services
- Platform architecture
- Speech and Cortana
- Tiles, toasts, and notifications
By running and exploring the samples, developers can get an idea of the available features. Each sample has a README.md file that describes the scenarios it covers and provides links to the related feature docs. Examples of what can be found in the Windows-universal-samples collection include:
- The XAML UI basics sample shows the different XAML controls and layout panels available. Other XAML-specific samples provide more detail on specific controls or scenarios, such as ListView and GridView, Pivot, and navigation patterns.
- The Direct2D photo adjustment sample shows how to use Direct2D to manipulate images. Other Direct2D samples cover custom image effects and gradient meshes. There are Direct3D samples in this collection as well, plus a separate DirectX-Graphics-Samples collection.
- The MapControl sample shows how Microsoft has combined the different mapping features available in earlier platforms into a new, unified experience that works across all supported devices.
Full App Samples
Full app samples are fully functional, but small enough to learn from without too much complexity. The goal of the samples is to combine 3 or 4 platform features in each app to demonstrate how to solve some problems that arise in the real world, such as data management and code organization.
Each of these samples is intentionally missing the kind of polish needed in a successful app, such as compelling tiles, splash screens, and sharing capabilities. This simplification makes them suitable both for easier learning and for forming the basis of apps. Developers can copy any of the code from these apps into projects resulting in apps that can be published to the Windows Store and monetize.
App samples include:
- TrafficApp: Shows how to build a traffic monitoring app by combining the MapControl, location and route services, background tasks, and toast notifications. Although this app uses a conventional code-behind structure, it demonstrates some organizational best practices with a reusable LocationHelper component that can help you build similar apps.
- RSS Reader: Shows how to build a news app using the syndication APIs, serialization and local storage, and an adaptive layout. This app also demonstrates best practices by using a basic Model-View-ViewModel (MVVM) architecture.
- QuizGame: Shows how to use networking features to build a pub-style trivia game where questions are displayed on a big screen while players answer the questions on their own devices. This demonstrates how the same app instance can effectively run simultaneously on multiple devices in direct communication with one-another.
As with the API and feature samples collection, each of these app samples has its own Issues list on GitHub that can be used to provide feedback or request changes.
Read more: https://dev.windows.com/en-us/samples