Quantcast
Channel: Building Apps for Windows
Viewing all 623 articles
Browse latest View live

New Year, New Devs: Sharpen your C# Skills

$
0
0

At the beginning of each new year, many people take on a challenge to learn something new or commit to reinforcing existing skills. Over the next two blog posts, we will guide you through two amazing, free, developer training video series: C# fundamentals and UWP Development.

Both series require no prior programming experience, so they’re perfect for someone who wants to learn something new. However, since the videos span a wide array of topics, they’re also great to brush up on your existing skills.

The series are presented by Bob Tabor from Developer University (formerly learnvisualstudio.net). Bob is known for his easy-to- follow teaching style, keeping you engaged and entertained while learning the topic.

To get started, we’ll take a look at the first series: C# Fundamentals for the Absolute Beginner. In this free Microsoft Virtual Academy course, you will learn core C# concepts applicable to a wide range of classic and modern applications.

For the beginner, or if you’re coming from a different language, this series will walk you through getting the tools, writing code, debugging features, customizations and much more. For the experienced C# developer who wants to brush up on certain topics, each concept is explained in its own video so you can jump to a topic and focus on the information you want.

Here’s a list of the course modules:

Getting Started

1 | Course Introduction

2 | Installing Visual Studio

3 | Creating Your First C# Program

4 | Understanding Your First C# Program

5 | Working with Code Files, Projects, and Solutions

The Basics

6 | Understanding Data Types and Variables

7 | The if Decision Statement

8 | Operators, Expressions, and Statements

9 | for Iteration Statement

10 | Understanding Arrays

11 | Defining and Calling Methods

12 | While Iteration Statement

13 | Working with Strings

14 | Working with Dates and Times

Understanding and Writing Well Constructed Code

15 | Understanding Classes

16 | More About Classes and Methods

17 | Understanding Scope and Accessibility Modifiers

18 | Understanding Namespaces and Working with the .NET Class Library

19 | Creating and Adding References to Assemblies

Advancing

20 | Working with Collections

21 | Working with LINQ

22 | Enumerations and the Switch Decision Statement

23 | Gracefully Handling Exceptions

24 | Understanding Events and Event-Driven Programming

25 | Where to Go from Here

Microsoft Virtual Academy will keep track of your progress as you move through the modules and complete assessments. If you want to jump to a particular module, you can do that by clicking one of the links above or use the Contents tab next to the current video playing.

In the next post, we will take you through the next video course that will show you how to apply your new, or refreshed, C# skills and introduce you to XAML in a Windows 10 Universal Windows Application.

The post New Year, New Devs: Sharpen your C# Skills appeared first on Building Apps for Windows.


New Bluetooth features in Windows 10 Creators Update (a.k.a. GATT Server and friends)

$
0
0

This release is big on Bluetooth. If you’re familiar with Windows Bluetooth APIs, have been meaning to try them out, or if you’re just starting to dabble in IoT and wearables, this is a great time to take a fresh look at all things Bluetooth. To ensure the APIs we built out are functional and performant, we are working directly with Fitbit, Garmin and other device manufacturers and we would love your feedback as well.

There are three main features in this month’s Insider preview:

  • GATT Server
  • Bluetooth LE Peripheral
  • Unpaired Bluetooth LE device connectivity

A lot of the improvements are focused on Bluetooth LE, but we have improved Bluetooth audio functionality as well. While we made a lot of changes under the hood to ensure that all your devices talk nicely with each other, we also added a couple of new features.

Call Control API support comes to desktop. This means your VoIP apps can natively take advantage of Bluetooth headset functionality like pick up, hang up, hold, call waiting, etc. You will also experience higher-quality audio for voice, thanks to Wideband speech – coming soon to desktop. Now, Cortana will sound more lifelike and your Skype sessions will sound better than ever over Bluetooth.

Now, let’s break down the LE portions of this feature set.

GATT Server

GATT (or Generic ATTribute) logically describes how data is structured and must function in a Bluetooth LE device. The device that has the interesting data is the Server, and the device that uses that data to perform a function is known as the Client. For example, a Windows Phone (Client) reads data from a heart rate monitor (Server) to track that a user is working out optimally. Windows has traditionally been a GATT Client but with the Windows 10 Creators Update, Windows can operate as the Server as well. The hierarchy of classes in the example heart rate service is described below, but you can pick and choose any logical set of characteristics and descriptors to make your custom GATT service.

Your phone or PC has notification/user credential information that a wearable device does not have. For instance, when an incoming text message comes in, Windows can act as the GATT Server and notify a nearby wearable of the text’s arrival. Diagram 1 shows a sample service structure using Bluetooth classes implemented in this release.

Diagram 1: Sample Heart Rate GattDeviceService

For a more thorough discussion of GATT and all of its intricacies, take a look at the Bluetooth SIG page or the GATT tutorial on Adafruit.

Bluetooth LE Peripheral Role

In addition to GATT roles which determine the structure of the data, Bluetooth defines Generic Access Profile (GAP) roles as well.

These GAP roles specify which device advertises as connectable and which device does the connecting. To connect a device, Windows users generally go to the Settings page, find the device they want to connect and tap to connect. This action of connecting to remote devices implies that Windows is operating in the GAP Central role. However, there are often cases where remote devices such as smart locks need to be aware of Windows, or where you’re trying to connect two Windows devices. In such cases, we need to make sure that Windows can advertise as connectable. With the new Insider preview, apps can put the system in a state to advertise support for Bluetooth LE services. With Peripheral role and GATT Server combined, Windows can operate in all four combinations of GATT and GAP roles (color choices arbitrary, of course):

Diagram 2: Windows operating in all GATT and GAP roles

Unpaired Bluetooth LE device connectivity

Traditionally, Bluetooth LE devices needed to be paired with Windows to be accessed. This either forced the user to switch context to the Settings page, or caused developers to implement in-app pairing logic within the app. Unfortunately, there were even devices that didn’t support pairing, which necessitated ugly workarounds for the developer. All that is going to change now with the new Async GATT APIs.

In the new APIs, take a look at BluetoothLEDevice.GetGattServicesAsync(), GattDeviceService.GetCharacteristicsAsync() as well as GattCharacteristic.GetDescriptorsAsync() to get an idea for how to query a remote device without pairing.

What you need to get started

It’s all in the release preview Build and SDK, available to download here. Once you install the build, take a look at the classes that were described in the previous sections and have at it. We’re a little light on the documentation right now, but we will remedy that soon.

Does this mean my <insert wearable here> can get notifications?

GATT Server will open up a myriad of Bluetooth LE device-to-device scenarios that we think are super exciting! Why limit yourself to “Notifications”? Think remote authentication, smart locks, proximity and IoT! The world is your (wireless) oyster. But yes, developers can start enabling notifications now. However, consumers will only see this functionality lit up once Windows 10 Creators Update is released and their updated app is in the store.

If you would like us to go deeper on any of the topics in this post, please let us know in the comment sections below.

The post New Bluetooth features in Windows 10 Creators Update (a.k.a. GATT Server and friends) appeared first on Building Apps for Windows.

Windows 10 SDK Preview Build 15003 Released

$
0
0

Today, we released a new Windows 10 Creators Update SDK Preview to be used in conjunction with Windows 10 Insider Preview (Build 15003 or greater). The Preview SDK is a pre-release and cannot be used in a production environment. Please only install the SDK on your test machine. The Preview SDK Build 15003 contains bug fixes and under development changes to the API surface area. If you are working on an application that you need to submit to the store, you should not install the preview.

The Preview SDK can be downloaded from developer section on Windows Insider.

For feedback and updates to the known issues, please see the developer forum.  For new feature requests, head over to our Windows Platform UserVoice.

Things to Note:

What’s New:

Known Issues Windows SDK:

  • There is no Emulator with this release
  • I cannot specify the new SDK version 15003 when creating a new project
    This version of the SDK only works with Visual Studio 2017.  You can download the Visual Studio 2017 Preview. If you install the latest version Visual Studio 2017, you will be able to specify the build 15003.

API Updates and Additions:

The following API changes are under development and new or updated for this release of the SDK.

namespace Windows.ApplicationModel.Preview.Notes {
  public sealed class NotesWindowManagerPreview {
    void SetFocusToPreviousView();
    IAsyncAction SetThumbnailImageForTaskSwitcherAsync(SoftwareBitmap bitmap);
    void ShowNoteRelativeTo(int noteViewId, int anchorNoteViewId, NotesWindowManagerPreviewShowNoteOptions options);
    void ShowNoteWithPlacement(int noteViewId, IBuffer data, NotesWindowManagerPreviewShowNoteOptions options);
  }
  public sealed class NotesWindowManagerPreviewShowNoteOptions
}
namespace Windows.Devices.Gpio {
  public struct GpioChangeCount
  public sealed class GpioChangeCounter : IClosable
  public enum GpioChangePolarity
  public sealed class GpioChangeReader : IClosable
  public struct GpioChangeRecord
  public enum GpioOpenStatus {
    MuxingConflict = 3,
    UnknownError = 4,
  }
}
namespace Windows.Devices.I2c {
  public enum I2cTransferStatus {
    ClockStretchTimeout = 3,
    UnknownError = 4,
  }
}
namespace Windows.Devices.Pwm {
  public sealed class PwmController {
    public static IAsyncOperation<PwmController> FromIdAsync(string deviceId);
    public static string GetDeviceSelector();
    public static string GetDeviceSelector(string friendlyName);
  }
}
namespace Windows.Devices.SmartCards {
  public sealed class SmartCardTriggerDetails {
    SmartCard SmartCard { get; }
  }
}
namespace Windows.Devices.SmartCards {
  public enum SmartCardCryptogramAlgorithm {
    Sha256Hmac = 8,
  }
  public sealed class SmartCardCryptogramGenerator {
    IAsyncOperation<SmartCardCryptogramGetAllCryptogramMaterialCharacteristicsResult> GetAllCryptogramMaterialCharacteristicsAsync(SmartCardUnlockPromptingBehavior promptingBehavior, string materialPackageName);
    IAsyncOperation<SmartCardCryptogramGetAllCryptogramMaterialPackageCharacteristicsResult> GetAllCryptogramMaterialPackageCharacteristicsAsync();
    IAsyncOperation<SmartCardCryptogramGetAllCryptogramMaterialPackageCharacteristicsResult> GetAllCryptogramMaterialPackageCharacteristicsAsync(string storageKeyName);
    IAsyncOperation<SmartCardCryptogramGetAllCryptogramStorageKeyCharacteristicsResult> GetAllCryptogramStorageKeyCharacteristicsAsync();
    IAsyncOperation<SmartCardCryptogramGeneratorOperationStatus> ValidateRequestApduAsync(SmartCardUnlockPromptingBehavior promptingBehavior, IBuffer apduToValidate, IIterable<SmartCardCryptogramPlacementStep> cryptogramPlacementSteps);
  }
  public enum SmartCardCryptogramGeneratorOperationStatus {
    ValidationFailed = 12,
  }
  public sealed class SmartCardCryptogramGetAllCryptogramMaterialCharacteristicsResult
  public sealed class SmartCardCryptogramGetAllCryptogramMaterialPackageCharacteristicsResult
  public sealed class SmartCardCryptogramGetAllCryptogramStorageKeyCharacteristicsResult
  public sealed class SmartCardCryptogramMaterialCharacteristics
  public sealed class SmartCardCryptogramMaterialPackageCharacteristics
  public enum SmartCardCryptogramMaterialProtectionMethod
  public sealed class SmartCardCryptogramStorageKeyCharacteristics
}
namespace Windows.Foundation.Metadata {
  public sealed class FeatureAttribute : Attribute
  public enum FeatureStage
}
namespace Windows.ApplicationModel {
  public sealed class Package {
    IAsyncOperation<PackageContentGroup> GetContentGroupAsync(string name);
    IAsyncOperation<IVector<PackageContentGroup>> GetContentGroupsAsync();
    IAsyncOperation<bool> SetInUseAsync(bool inUse);
    IAsyncOperation<IVector<PackageContentGroup>> StageContentGroupsAsync(IIterable<string> names);
    IAsyncOperation<IVector<PackageContentGroup>> StageContentGroupsAsync(IIterable<string> names, bool moveToHeadOfQueue);
  }
  public sealed class PackageCatalog {
    event TypedEventHandler<PackageCatalog, PackageContentGroupStagingEventArgs> PackageContentGroupStaging;
    IAsyncOperation<PackageCatalogAddOptionalPackageResult> AddOptionalPackageAsync(string optionalPackageFamilyName);
  }
  public sealed class PackageCatalogAddOptionalPackageResult
  public sealed class PackageContentGroup
  public sealed class PackageContentGroupStagingEventArgs
  public enum PackageContentGroupState
  public sealed class PackageStatus {
    bool IsPartiallyStaged { get; }
  }
}
namespace Windows.ApplicationModel.Activation {
  public enum ActivationKind {
    ContactPanel = 1017,
    LockScreenComponent = 1016,
  }
  public sealed class ContactPanelActivatedEventArgs : IActivatedEventArgs, IActivatedEventArgsWithUser, IContactPanelActivatedEventArgs
  public interface IContactPanelActivatedEventArgs
  public sealed class LockScreenComponentActivatedEventArgs : IActivatedEventArgs
  public sealed class ToastNotificationActivatedEventArgs : IActivatedEventArgs, IActivatedEventArgsWithUser, IApplicationViewActivatedEventArgs, IToastNotificationActivatedEventArgs {
    int CurrentlyShownApplicationViewId { get; }
  }
}
namespace Windows.ApplicationModel.Background {
  public sealed class BackgroundTaskBuilder {
    BackgroundTaskRegistrationGroup TaskGroup { get; set; }
  }
  public sealed class BackgroundTaskRegistration : IBackgroundTaskRegistration, IBackgroundTaskRegistration2, IBackgroundTaskRegistration3 {
    public static IMapView<string, BackgroundTaskRegistrationGroup> AllTaskGroups { get; }
    BackgroundTaskRegistrationGroup TaskGroup { get; }
    public static BackgroundTaskRegistrationGroup GetTaskGroup(string groupId);
  }
  public sealed class BackgroundTaskRegistrationGroup
  public sealed class GattCharacteristicNotificationTrigger : IBackgroundTrigger {
    public GattCharacteristicNotificationTrigger(GattCharacteristic characteristic, BluetoothEventTriggeringMode eventTriggeringMode);
    BluetoothEventTriggeringMode EventTriggeringMode { get; }
  }
  public sealed class GattServiceProviderTrigger : IBackgroundTrigger
  public sealed class GattServiceProviderTriggerResult
  public interface IBackgroundTaskRegistration3 : IBackgroundTaskRegistration
}
namespace Windows.ApplicationModel.Contacts {
  public sealed class ContactAnnotation {
    string ContactListId { get; set; }
  }
  public enum ContactAnnotationOperations : uint {
    Share = (uint)32,
  }
  public sealed class ContactAnnotationStore {
    IAsyncOperation<IVectorView<ContactAnnotation>> FindAnnotationsForContactListAsync(string contactListId);
  }
  public sealed class ContactGroup
  public static class ContactManager {
    public static bool IncludeMiddleNameInSystemDisplayAndSort { get; set; }
    public static IAsyncOperation<bool> IsShowFullContactCardSupportedAsync();
  }
  public sealed class ContactManagerForUser {
    void ShowFullContactCard(Contact contact, FullContactCardOptions fullContactCardOptions);
  }
  public sealed class ContactPanel
  public sealed class ContactPanelClosingEventArgs
  public sealed class ContactPanelLaunchFullAppRequestedEventArgs
  public sealed class ContactPicker {
    User User { get; }
    public static ContactPicker CreateForUser(User user);
    public static IAsyncOperation<bool> IsSupportedAsync();
  }
  public sealed class PinnedContactIdsQueryResult
  public sealed class PinnedContactManager
  public enum PinnedContactSurface
}
namespace Windows.ApplicationModel.Core {
  public sealed class CoreApplicationView {
    IPropertySet Properties { get; }
  }
}
namespace Windows.ApplicationModel.DataTransfer {
  public sealed class DataPackage {
    event TypedEventHandler<DataPackage, ShareCompletedEventArgs> ShareCompleted;
  }
  public sealed class DataTransferManager {
    event TypedEventHandler<DataTransferManager, ShareProvidersRequestedEventArgs> ShareProvidersRequested;
  }
  public sealed class ShareCompletedEventArgs
  public sealed class SharePeople
  public sealed class ShareProvider
  public delegate void ShareProviderHandler(ShareProviderRequest request);
  public sealed class ShareProviderRequest
  public sealed class ShareProvidersRequestedEventArgs
  public sealed class ShareTargetInfo
}
namespace Windows.ApplicationModel.DataTransfer.ShareTarget {
  public sealed class ShareOperation {
    SharePeople People { get; }
  }
}
namespace Windows.ApplicationModel.Email {
  public sealed class EmailMessage {
    IVector<EmailRecipient> ReplyTo { get; }
    EmailRecipient SentRepresenting { get; set; }
  }
}
namespace Windows.ApplicationModel.Payments {
  public sealed class PaymentAddress
  public sealed class PaymentCurrencyAmount
  public sealed class PaymentDetails
  public sealed class PaymentDetailsModifier
  public sealed class PaymentItem
  public sealed class PaymentMediator
  public sealed class PaymentMerchantInfo
  public sealed class PaymentMethodData
  public enum PaymentOptionPresence
  public sealed class PaymentOptions
  public sealed class PaymentRequest
  public sealed class PaymentRequestChangedArgs
  public delegate void PaymentRequestChangedHandler(PaymentRequest paymentRequest, PaymentRequestChangedArgs args);
  public sealed class PaymentRequestChangedResult
  public enum PaymentRequestChangeKind
  public enum PaymentRequestCompletionStatus
  public enum PaymentRequestStatus
  public sealed class PaymentRequestSubmitResult
  public sealed class PaymentResponse
  public sealed class PaymentShippingOption
  public enum PaymentShippingType
  public sealed class PaymentToken
}
namespace Windows.ApplicationModel.Payments.Provider {
  public sealed class PaymentAppManager
  public sealed class PaymentTransaction
  public sealed class PaymentTransactionAcceptResult
}
namespace Windows.ApplicationModel.Preview.Holographic {
  public static class HolographicApplicationPreview
}
namespace Windows.ApplicationModel.Store.LicenseManagement {
  public static class LicenseManager {
    public static IAsyncAction RefreshLicensesAsync(LicenseRefreshOption refreshOption);
  }
  public enum LicenseRefreshOption
}
namespace Windows.ApplicationModel.Store.Preview {
  public static class StoreConfiguration {
    public static string GetEnterpriseStoreWebAccountId();
    public static string GetEnterpriseStoreWebAccountIdForUser(User user);
    public static string GetStoreWebAccountId();
    public static string GetStoreWebAccountIdForUser(User user);
    public static void SetEnterpriseStoreWebAccountId(string webAccountId);
    public static void SetEnterpriseStoreWebAccountIdForUser(User user, string webAccountId);
    public static bool ShouldRestrictToEnterpriseStoreOnly();
    public static bool ShouldRestrictToEnterpriseStoreOnlyForUser(User user);
  }
}
namespace Windows.ApplicationModel.Store.Preview.InstallControl {
  public sealed class AppInstallManager {
    IAsyncOperation<GetEntitlementResult> GetFreeDeviceEntitlementAsync(string storeId, string campaignId, string correlationVector);
    IAsyncOperation<GetEntitlementResult> GetFreeUserEntitlementAsync(string storeId, string campaignId, string correlationVector);
    IAsyncOperation<GetEntitlementResult> GetFreeUserEntitlementForUserAsync(User user, string storeId, string campaignId, string correlationVector);
  }
  public sealed class GetEntitlementResult
  public enum GetEntitlementStatus
}
namespace Windows.ApplicationModel.UserActivities {
  public sealed class UserActivity
  public sealed class UserActivityChannel
  public sealed class UserActivitySession : IClosable
  public enum UserActivityState
  public sealed class UserActivityVisualElements
}
namespace Windows.ApplicationModel.UserActivities.Core {
  public static class CoreUserActivityManager
}
namespace Windows.ApplicationModel.UserDataAccounts {
  public sealed class UserDataAccount {
    bool CanShowCreateContactGroup { get; set; }
    IRandomAccessStreamReference Icon { get; set; }
    bool IsProtectedUnderLock { get; set; }
    IPropertySet ProviderProperties { get; }
    IAsyncOperation<IVectorView<ContactGroup>> FindContactGroupsAsync();
    IAsyncOperation<IVectorView<UserDataTaskList>> FindUserDataTaskListsAsync();
    IAsyncOperation<string> TryShowCreateContactGroupAsync();
  }
  public sealed class UserDataAccountStore {
    IAsyncOperation<UserDataAccount> CreateAccountAsync(string userDisplayName, string packageRelativeAppId, string enterpriseId);
  }
}
namespace Windows.ApplicationModel.UserDataTasks {
  public sealed class UserDataTask
  public sealed class UserDataTaskBatch
  public enum UserDataTaskDaysOfWeek : uint
  public enum UserDataTaskDetailsKind
  public enum UserDataTaskKind
  public sealed class UserDataTaskList
  public sealed class UserDataTaskListLimitedWriteOperations
  public enum UserDataTaskListOtherAppReadAccess
  public enum UserDataTaskListOtherAppWriteAccess
  public sealed class UserDataTaskListSyncManager
  public enum UserDataTaskListSyncStatus
  public sealed class UserDataTaskManager
  public enum UserDataTaskPriority
  public enum UserDataTaskQueryKind
  public sealed class UserDataTaskQueryOptions
  public enum UserDataTaskQuerySortProperty
  public sealed class UserDataTaskReader
  public sealed class UserDataTaskRecurrenceProperties
  public enum UserDataTaskRecurrenceUnit
  public sealed class UserDataTaskRegenerationProperties
  public enum UserDataTaskRegenerationUnit
  public enum UserDataTaskSensitivity
  public sealed class UserDataTaskStore
  public enum UserDataTaskStoreAccessType
  public enum UserDataTaskWeekOfMonth
}
namespace Windows.ApplicationModel.UserDataTasks.DataProvider {
  public sealed class UserDataTaskDataProviderConnection
  public sealed class UserDataTaskDataProviderTriggerDetails
  public sealed class UserDataTaskListCompleteTaskRequest
  public sealed class UserDataTaskListCompleteTaskRequestEventArgs
  public sealed class UserDataTaskListCreateOrUpdateTaskRequest
  public sealed class UserDataTaskListCreateOrUpdateTaskRequestEventArgs
  public sealed class UserDataTaskListDeleteTaskRequest
  public sealed class UserDataTaskListDeleteTaskRequestEventArgs
  public sealed class UserDataTaskListSkipOccurrenceRequest
  public sealed class UserDataTaskListSkipOccurrenceRequestEventArgs
  public sealed class UserDataTaskListSyncManagerSyncRequest
  public sealed class UserDataTaskListSyncManagerSyncRequestEventArgs
}
namespace Windows.Devices.Bluetooth {
  public sealed class BluetoothAdapter
  public enum BluetoothAddressType {
    Unspecified = 2,
  }
  public sealed class BluetoothDeviceId
  public enum BluetoothError {
    TransportNotSupported = 9,
  }
  public sealed class BluetoothLEDevice : IClosable {
    DeviceAccessInformation DeviceAccessInformation { get; }
    IAsyncOperation<GattDeviceServicesResult> GetGattServicesAsync();
    IAsyncOperation<GattDeviceServicesResult> GetGattServicesAsync(BluetoothCacheMode cacheMode);
    IAsyncOperation<GattDeviceServicesResult> GetGattServicesForUuidAsync(GattUuid serviceUuid);
    IAsyncOperation<GattDeviceServicesResult> GetGattServicesForUuidAsync(GattUuid serviceUuid, BluetoothCacheMode cacheMode);
    IAsyncOperation<DeviceAccessStatus> RequestAccessAsync();
  }
}
namespace Windows.Devices.Bluetooth.Background {
  public enum BluetoothEventTriggeringMode
 public sealed class GattCharacteristicNotificationTriggerDetails {
    BluetoothError Error { get; }
    BluetoothEventTriggeringMode EventTriggeringMode { get; }
    IVectorView<GattValueChangedEventArgs> ValueChangedEvents { get; }
  }
  public sealed class GattServiceProviderConnection
  public sealed class GattServiceProviderTriggerDetails
}
namespace Windows.Devices.Bluetooth.GenericAttributeProfile {
  public sealed class GattCharacteristic {
    IAsyncOperation<GattDescriptorsResult> GetDescriptorsAsync();
    IAsyncOperation<GattDescriptorsResult> GetDescriptorsAsync(BluetoothCacheMode cacheMode);
    IAsyncOperation<GattDescriptorsResult> GetDescriptorsForUuidAsync(GattUuid descriptorUuid);
    IAsyncOperation<GattDescriptorsResult> GetDescriptorsForUuidAsync(GattUuid descriptorUuid, BluetoothCacheMode cacheMode);
    IAsyncOperation<GattWriteResult> WriteClientCharacteristicConfigurationDescriptorWithResultAsync(GattClientCharacteristicConfigurationDescriptorValue clientCharacteristicConfigurationDescriptorValue);
    IAsyncOperation<GattWriteResult> WriteValueWithResultAsync(IBuffer value);
    IAsyncOperation<GattWriteResult> WriteValueWithResultAsync(IBuffer value, GattWriteOption writeOption);
  }
  public sealed class GattCharacteristicsResult
  public sealed class GattClientNotificationResult
  public enum GattCommunicationStatus {
    ProtocolError = 2,
  }
  public sealed class GattDescriptor {
    IAsyncOperation<GattWriteResult> WriteValueWithResultAsync(IBuffer value);
  }
 public sealed class GattDescriptorsResult
  public sealed class GattDeviceService : IClosable {
    DeviceAccessInformation DeviceAccessInformation { get; }
    GattSession Session { get; }
    GattSharingMode SharingMode { get; }
    public static IAsyncOperation<GattDeviceService> FromIdAsync(string deviceId, GattSharingMode sharingMode);
    IAsyncOperation<GattCharacteristicsResult> GetCharacteristicsAsync();
    IAsyncOperation<GattCharacteristicsResult> GetCharacteristicsAsync(BluetoothCacheMode cacheMode);
    IAsyncOperation<GattCharacteristicsResult> GetCharacteristicsForUuidAsync(GattUuid characteristicUuid);
    IAsyncOperation<GattCharacteristicsResult> GetCharacteristicsForUuidAsync(GattUuid characteristicUuid, BluetoothCacheMode cacheMode);
    public static string GetDeviceSelector(GattUuid gattUuid);
    public static string GetDeviceSelectorForBluetoothDeviceId(BluetoothDeviceId bluetoothDeviceId);
    public static string GetDeviceSelectorForBluetoothDeviceId(BluetoothDeviceId bluetoothDeviceId, BluetoothCacheMode cacheMode);
    public static string GetDeviceSelectorForBluetoothDeviceIdAndGattUuid(BluetoothDeviceId bluetoothDeviceId, GattUuid gattUuid);
    public static string GetDeviceSelectorForBluetoothDeviceIdAndGattUuid(BluetoothDeviceId bluetoothDeviceId, GattUuid gattUuid, BluetoothCacheMode cacheMode);
    IAsyncOperation<GattDeviceServicesResult> GetIncludedServicesAsync();
    IAsyncOperation<GattDeviceServicesResult> GetIncludedServicesAsync(BluetoothCacheMode cacheMode);
    IAsyncOperation<GattDeviceServicesResult> GetIncludedServicesForUuidAsync(GattUuid serviceUuid);
    IAsyncOperation<GattDeviceServicesResult> GetIncludedServicesForUuidAsync(GattUuid serviceUuid, BluetoothCacheMode cacheMode);
    IAsyncOperation<GattOpenStatus> OpenAsync(GattSharingMode sharingMode);
    IAsyncOperation<DeviceAccessStatus> RequestAccessAsync();
  }
  public sealed class GattDeviceServicesResult
  public sealed class GattLocalCharacteristic
  public sealed class GattLocalCharacteristicParameters
  public sealed class GattLocalCharacteristicResult
  public sealed class GattLocalDescriptor
  public sealed class GattLocalDescriptorParameters
  public sealed class GattLocalDescriptorResult
  public sealed class GattLocalService
  public enum GattOpenStatus
  public sealed class GattPresentationFormat {
    public static GattPresentationFormat FromParts(byte formatType, int exponent, ushort unit, byte namespaceId, ushort description);
  }
  public static class GattProtocolError
  public sealed class GattReadClientCharacteristicConfigurationDescriptorResult {
    IReference<byte> ProtocolError { get; }
  }
  public sealed class GattReadRequest
  public sealed class GattReadRequestedEventArgs
  public sealed class GattReadResponse
  public sealed class GattReadResult {
    IReference<byte> ProtocolError { get; }
  }
  public sealed class GattReliableWriteTransaction {
    IAsyncOperation<GattWriteResult> CommitWithResultAsync();
  }
  public enum GattRequestState
  public sealed class GattRequestStateChangedEventArgs
  public sealed class GattServiceProvider
  public enum GattServiceProviderAdvertisementStatus
  public sealed class GattServiceProviderAdvertisementStatusChangedEventArgs
  public sealed class GattServiceProviderAdvertisingParameters
  public sealed class GattServiceProviderResult
  public sealed class GattSession : IClosable
  public enum GattSessionStatus
  public sealed class GattSessionStatusChangedEventArgs
  public enum GattSharingMode
  public sealed class GattSubscribedClient
  public sealed class GattUuid
  public sealed class GattWriteRequest
  public sealed class GattWriteRequestedEventArgs
  public sealed class GattWriteResponse
  public sealed class GattWriteResult
}
namespace Windows.Devices.Haptics {
  public static class KnownSimpleHapticsControllerWaveforms
  public sealed class SimpleHapticsController
  public sealed class SimpleHapticsControllerFeedback
  public enum VibrationAccessStatus
  public sealed class VibrationDevice
}
namespace Windows.Devices.PointOfService {
  public sealed class BarcodeScanner : IClosable {
    void Close();
    public static string GetDeviceSelector(PosConnectionTypes connectionTypes);
  }
  public static class BarcodeSymbologies {
    public static uint Gs1DWCode { get; }
  }
  public sealed class BarcodeSymbologyAttributes
  public enum BarcodeSymbologyDecodeLengthKind
  public sealed class CashDrawer : IClosable {
    void Close();
    public static string GetDeviceSelector(PosConnectionTypes connectionTypes);
  }
  public sealed class ClaimedBarcodeScanner : IClosable {
    IAsyncOperation<BarcodeSymbologyAttributes> GetSymbologyAttributesAsync(uint barcodeSymbology);
    IAsyncOperation<bool> SetSymbologyAttributesAsync(uint barcodeSymbology, BarcodeSymbologyAttributes attributes);
  }
  public sealed class ClaimedLineDisplay : IClosable
  public sealed class LineDisplay : IClosable
  public sealed class LineDisplayCapabilities
  public enum LineDisplayScrollDirection
  public enum LineDisplayTextAttribute
  public enum LineDisplayTextAttributeGranularity
  public sealed class LineDisplayWindow : IClosable
  public sealed class MagneticStripeReader : IClosable {
    void Close();
    public static string GetDeviceSelector(PosConnectionTypes connectionTypes);
  }
  public enum PosConnectionTypes : uint
  public sealed class PosPrinter : IClosable {
    void Close();
    public static string GetDeviceSelector(PosConnectionTypes connectionTypes);
  }
}
namespace Windows.Gaming.Input {
  public sealed class ArcadeStick : IGameController, IGameControllerBatteryInfo {
    public static ArcadeStick FromGameController(IGameController gameController);
    BatteryReport TryGetBatteryReport();
  }
  public sealed class FlightStick : IGameController, IGameControllerBatteryInfo
  public enum FlightStickButtons : uint
  public struct FlightStickReading
  public enum GameControllerSwitchKind
  public enum GameControllerSwitchPosition
  public sealed class Gamepad : IGameController, IGameControllerBatteryInfo {
    public static Gamepad FromGameController(IGameController gameController);
    BatteryReport TryGetBatteryReport();
  }
  public sealed class Headset : IGameControllerBatteryInfo {
    BatteryReport TryGetBatteryReport();
  }
  public interface IGameControllerBatteryInfo
  public sealed class RacingWheel : IGameController, IGameControllerBatteryInfo {
    public static RacingWheel FromGameController(IGameController gameController);
    BatteryReport TryGetBatteryReport();
  }
  public sealed class RawGameController : IGameController, IGameControllerBatteryInfo
  public sealed class UINavigationController : IGameController, IGameControllerBatteryInfo {
    public static UINavigationController FromGameController(IGameController gameController);
    BatteryReport TryGetBatteryReport();
  }
}
namespace Windows.Gaming.Input.Custom {
  public static class GameControllerFactoryManager {
    public static IGameController TryGetFactoryControllerFromGameController(ICustomGameControllerFactory factory, IGameController gameController);
  }
  public sealed class HidGameControllerProvider : IGameControllerProvider
  public interface IHidGameControllerInputSink : IGameControllerInputSink
}
namespace Windows.Gaming.UI {
  public enum GameChatMessageOrigin
  public sealed class GameChatOverlay
  public enum GameChatOverlayPosition
}
namespace Windows.Globalization {
  public static class CurrencyIdentifiers {
    public static string BYN { get; }
  }
}
namespace Windows.Globalization.Collation {
  public sealed class CharacterGroupings : IIterable<CharacterGrouping>, IVectorView<CharacterGrouping> {
    public CharacterGroupings(string language);
  }
}
namespace Windows.Graphics {
  public struct PointInt32
  public struct RectInt32
  public struct SizeInt32
}
namespace Windows.Graphics.Display.Core {
  public enum HdmiDisplayColorSpace
  public struct HdmiDisplayHdr2086Metadata
  public enum HdmiDisplayHdrOption
  public sealed class HdmiDisplayInformation
  public sealed class HdmiDisplayMode
  public enum HdmiDisplayPixelEncoding
}
namespace Windows.Graphics.Holographic {
  public sealed class HolographicCamera {
    HolographicDisplay Display { get; }
    HolographicCameraViewportParameters LeftViewportParameters { get; }
    HolographicCameraViewportParameters RightViewportParameters { get; }
  }
  public sealed class HolographicCameraRenderingParameters {
    HolographicReprojectionMode ReprojectionMode { get; set; }
    void CommitDirect3D11DepthBuffer(IDirect3DSurface value);
  }
  public sealed class HolographicCameraViewportParameters
  public sealed class HolographicDisplay
  public enum HolographicReprojectionMode
  public sealed class HolographicSpace {
    public static bool IsAvailable { get; }
    public static bool IsSupported { get; }
    public static event EventHandler<object> IsAvailableChanged;
  }
}
namespace Windows.Graphics.Printing.PrintTicket {
  public sealed class PrintTicketCapabilities
  public sealed class PrintTicketFeature
  public enum PrintTicketFeatureSelectionType
  public sealed class PrintTicketOption
  public enum PrintTicketParameterDataType
  public sealed class PrintTicketParameterDefinition
  public sealed class PrintTicketParameterInitializer
  public sealed class PrintTicketValue
  public enum PrintTicketValueType
  public sealed class WorkflowPrintTicket
  public sealed class WorkflowPrintTicketValidationResult
}
namespace Windows.Graphics.Printing.Workflow {
  public sealed class ObjectModelSourceFileContent
  public sealed class PrintWorkflowBackgroundSession
  public sealed class PrintWorkflowBackgroundSetupRequestedEventArgs
  public sealed class PrintWorkflowConfiguration
  public sealed class PrintWorkflowContext
  public sealed class PrintWorkflowForegroundSession
  public sealed class PrintWorkflowForegroundSetupRequestedEventArgs
  public enum PrintWorkflowSessionStatus
  public sealed class PrintWorkflowSourceContent
  public sealed class PrintWorkflowSpoolStreamContent
  public sealed class PrintWorkflowStreamTarget
  public sealed class PrintWorkflowSubmittedEventArgs
  public sealed class PrintWorkflowSubmittedOperation
  public enum PrintWorkflowSubmittedStatus
  public sealed class PrintWorkflowTarget
  public sealed class PrintWorkflowUIActivatedEventArgs : IActivatedEventArgs, IActivatedEventArgsWithUser
  public sealed class PrintWorkflowXpsDataAvailableEventArgs
  public sealed class WorkflowTriggerDetails
  public sealed class XpsObjectModelTargetPackage
}
namespace Windows.Management {
  public sealed class MdmAlert
  public enum MdmAlertDataType
  public enum MdmAlertMark
  public sealed class MdmSession
  public static class MdmSessionManager
  public enum MdmSessionState
}
namespace Windows.Management.Deployment {
  public enum DeploymentOptions : uint {
    RequiredContentGroupOnly = (uint)256,
  }
  public sealed class DeploymentResult {
    bool IsRegistered { get; }
  }
  public sealed class PackageManager {
    PackageManagerDebugSettings DebugSettings { get; }
    IAsyncOperationWithProgress<DeploymentResult, DeploymentProgress> AddPackageAsync(Uri packageUri, IIterable<Uri> dependencyPackageUris, DeploymentOptions deploymentOptions, PackageVolume targetVolume, IIterable<string> optionalPackageFamilyNames, IIterable<Uri> externalPackageUris);
    IAsyncOperationWithProgress<DeploymentResult, DeploymentProgress> RegisterPackageByFamilyNameAsync(string mainPackageFamilyName, IIterable<string> dependencyPackageFamilyNames, DeploymentOptions deploymentOptions, PackageVolume appDataVolume, IIterable<string> optionalPackageFamilyNames);
    IAsyncOperationWithProgress<DeploymentResult, DeploymentProgress> StagePackageAsync(Uri packageUri, IIterable<Uri> dependencyPackageUris, DeploymentOptions deploymentOptions, PackageVolume targetVolume, IIterable<string> optionalPackageFamilyNames, IIterable<Uri> externalPackageUris);
  }
  public sealed class PackageManagerDebugSettings
}
namespace Windows.Management.Policies {
  public static class AboveLockPolicies
  public static class AccountsPolicies
  public static class AppHvsiPolicies
  public static class ApplicationManagementPolicies
  public sealed class ApplicationManagementPoliciesForUser
  public static class AuthenticationPolicies
  public sealed class AuthenticationPoliciesForUser
  public sealed class BinaryPolicy
  public static class BitlockerPolicies
  public static class BluetoothPolicies
  public sealed class BooleanPolicy
  public static class BrowserPolicies
  public static class CameraPolicies
  public static class ConnectivityPolicies
  public static class CryptographyPolicies
  public static class DataProtectionPolicies
  public static class DefenderPolicies
  public static class DeliveryOptimizationPolicies
  public static class DeviceLockPolicies
  public static class ExperiencePolicies
  public sealed class ExperiencePoliciesForUser
  public sealed class Int32Policy
  public static class LicensingPolicies
  public static class LockDownPolicies
  public static class MapsPolicies
  public static class MessagingPolicies
  public static class NamedPolicy
  public sealed class NamedPolicyData
  public enum NamedPolicyKind
  public static class NetworkIsolationPolicies
  public static class NotificationsPolicies
  public sealed class NotificationsPoliciesForUser
  public static class PrivacyPolicies
  public static class SearchPolicies
  public static class SecurityPolicies
  public static class SettingsPolicies
  public static class SpeechPolicies
  public static class StartPolicies
  public sealed class StartPoliciesForUser
  public sealed class StringPolicy
  public static class SystemPolicies
  public static class TextInputPolicies
  public static class UpdatePolicies
  public static class WiFiPolicies
  public static class WindowsInkWorkspacePolicies
  public static class WirelessDisplayPolicies
}
namespace Windows.Media {
  public sealed class MediaExtensionManager {
    void RegisterMediaExtensionForAppService(IMediaExtension extension, AppServiceConnection connection);
  }
  public sealed class MediaTimelineController {
    IReference<TimeSpan> Duration { get; set; }
    bool IsLoopingEnabled { get; set; }
    event TypedEventHandler<MediaTimelineController, object> Ended;
    event TypedEventHandler<MediaTimelineController, MediaTimelineControllerFailedEventArgs> Failed;
  }
  public sealed class MediaTimelineControllerFailedEventArgs
  public enum MediaTimelineControllerState {
    Error = 3,
    Stalled = 2,
  }
  public struct MediaTimeRange
}
namespace Windows.Media.Capture {
  public sealed class MediaCapture : IClosable {
    event TypedEventHandler<MediaCapture, MediaCaptureDeviceExclusiveControlStatusChangedEventArgs> CaptureDeviceExclusiveControlStatusChanged;
  }
  public enum MediaCaptureDeviceExclusiveControlStatus
  public sealed class MediaCaptureDeviceExclusiveControlStatusChangedEventArgs
  public sealed class MediaCaptureInitializationSettings {
    bool AlwaysPlaySystemShutterSound { get; set; }
  }
}
namespace Windows.Media.Capture.Frames {
  public sealed class DepthMediaFrame {
    uint MaxReliableDepth { get; }
    uint MinReliableDepth { get; }
  }
  public enum MediaFrameReaderStartStatus {
    ExclusiveControlNotAvailable = 4,
  }
}
namespace Windows.Media.Core {
  public enum AudioDecoderDegradationReason {
    SpatialAudioNotSupported = 2,
  }
  public sealed class ChapterCue : IMediaCue
  public enum CodecCategory
  public sealed class CodecInfo
  public enum CodecKind
  public sealed class CodecQuery
  public static class CodecSubtypes
  public sealed class DataCue : IMediaCue {
    PropertySet Properties { get; }
  }
  public sealed class ImageCue : IMediaCue
  public interface ITimedMetadataTrackProvider
  public sealed class MediaBindingEventArgs {
    void SetAdaptiveMediaSource(AdaptiveMediaSource mediaSource);
    void SetStorageFile(IStorageFile file);
  }
  public sealed class MediaSource : IClosable, IMediaPlaybackSource {
    AdaptiveMediaSource AdaptiveMediaSource { get; }
    MediaStreamSource MediaStreamSource { get; }
    MseStreamSource MseStreamSource { get; }
    Uri Uri { get; }
    IAsyncAction OpenAsync();
  }
  public sealed class MediaStreamSource : IMediaSource {
    IReference<double> MaxSupportedPlaybackRate { get; set; }
  }
  public sealed class SpeechCue : IMediaCue
  public enum TimedMetadataKind {
    ImageSubtitle = 6,
    Speech = 7,
  }
  public enum TimedTextFontStyle
  public sealed class TimedTextSource {
    public static TimedTextSource CreateFromStreamWithIndex(IRandomAccessStream stream, IRandomAccessStream indexStream);
    public static TimedTextSource CreateFromStreamWithIndex(IRandomAccessStream stream, IRandomAccessStream indexStream, string defaultLanguage);
    public static TimedTextSource CreateFromUriWithIndex(Uri uri, Uri indexUri);
    public static TimedTextSource CreateFromUriWithIndex(Uri uri, Uri indexUri, string defaultLanguage);
  }
  public sealed class TimedTextStyle {
    TimedTextFontStyle FontStyle { get; set; }
    bool IsLineThroughEnabled { get; set; }
    bool IsOverlineEnabled { get; set; }
    bool IsUnderlineEnabled { get; set; }
  }
}
namespace Windows.Media.Core.Preview {
  public static class SoundLevelBroker
}
namespace Windows.Media.Devices {
  public sealed class AudioDeviceModule
  public sealed class AudioDeviceModuleNotificationEventArgs
  public sealed class AudioDeviceModulesManager
  public sealed class ModuleCommandResult
  public enum SendCommandStatus
  public sealed class VideoDeviceController : IMediaDeviceController {
    string Id { get; }
  }
}
namespace Windows.Media.MediaProperties {
  public sealed class AudioEncodingProperties : IMediaEncodingProperties {
    bool IsSpatial { get; }
    public static AudioEncodingProperties CreateAlac(uint sampleRate, uint channelCount, uint bitsPerSample);
    public static AudioEncodingProperties CreateFlac(uint sampleRate, uint channelCount, uint bitsPerSample);
  }
  public sealed class MediaEncodingProfile {
    public static MediaEncodingProfile CreateAlac(AudioEncodingQuality quality);
    public static MediaEncodingProfile CreateFlac(AudioEncodingQuality quality);
    public static MediaEncodingProfile CreateHevc(VideoEncodingQuality quality);
  }
  public static class MediaEncodingSubtypes {
    public static string Alac { get; }
    public static string D16 { get; }
    public static string Flac { get; }
    public static string L16 { get; }
    public static string L8 { get; }
    public static string Vp9 { get; }
  }
  public enum SphericalVideoFrameFormat
  public sealed class VideoEncodingProperties : IMediaEncodingProperties {
    SphericalVideoFrameFormat SphericalVideoFrameFormat { get; }
    public static VideoEncodingProperties CreateHevc();
  }
  public enum VideoEncodingQuality {
    Uhd2160p = 8,
    Uhd4320p = 9,
  }
}
namespace Windows.Media.Playback {
  public enum AutoLoadedDisplayPropertyKind
  public sealed class CurrentMediaPlaybackItemChangedEventArgs {
    MediaPlaybackItemChangedReason Reason { get; }
  }
  public sealed class MediaPlaybackItem : IMediaPlaybackSource {
    AutoLoadedDisplayPropertyKind AutoLoadedDisplayProperties { get; set; }
    bool IsDisabledInPlaybackList { get; set; }
    double TotalDownloadProgress { get; }
  }
 public enum MediaPlaybackItemChangedReason
  public sealed class MediaPlaybackList : IMediaPlaybackSource {
    IReference<uint> MaxPlayedItemsToKeepOpen { get; set; }
  }
  public sealed class MediaPlaybackSession {
    bool IsMirroring { get; set; }
    MediaPlaybackSphericalVideoProjection SphericalVideoProjection { get; }
    event TypedEventHandler<MediaPlaybackSession, object> BufferedRangesChanged;
    event TypedEventHandler<MediaPlaybackSession, object> PlayedRangesChanged;
    event TypedEventHandler<MediaPlaybackSession, object> SeekableRangesChanged;
    event TypedEventHandler<MediaPlaybackSession, object> SupportedPlaybackRatesChanged;
    IVectorView<MediaTimeRange> GetBufferedRanges();
    IVectorView<MediaTimeRange> GetPlayedRanges();
    IVectorView<MediaTimeRange> GetSeekableRanges();
    bool IsSupportedPlaybackRateRange(double rate1, double rate2);
  }
  public sealed class MediaPlaybackSphericalVideoProjection
  public sealed class MediaPlayer : IClosable {
    bool IsVideoFrameServerEnabled { get; set; }
    event TypedEventHandler<MediaPlayer, object> VideoFrameAvailable;
    void CopyFrameToStereoscopicVideoSurfaces(IDirect3DSurface destinationLeftEye, IDirect3DSurface destinationRightEye);
    void CopyFrameToVideoSurface(IDirect3DSurface destination);
    void CopyFrameToVideoSurface(IDirect3DSurface destination, Rect targetRectangle);
  }
  public enum SphericalVideoProjectionMode
}
namespace Windows.Media.Protection.PlayReady {
  public interface IPlayReadyLicenseSession2 : IPlayReadyLicenseSession
  public sealed class PlayReadyLicense : IPlayReadyLicense {
    bool ExpiresInRealTime { get; }
    bool InMemoryOnly { get; }
    Guid SecureStopId { get; }
    uint SecurityLevel { get; }
  }
  public sealed class PlayReadyLicenseAcquisitionServiceRequest : IMediaProtectionServiceRequest, IPlayReadyLicenseAcquisitionServiceRequest, IPlayReadyServiceRequest {
    PlayReadyLicenseIterable CreateLicenseIterable(PlayReadyContentHeader contentHeader, bool fullyEvaluated);
  }
  public sealed class PlayReadyLicenseSession : IPlayReadyLicenseSession, IPlayReadyLicenseSession2 {
    PlayReadyLicenseIterable CreateLicenseIterable(PlayReadyContentHeader contentHeader, bool fullyEvaluated);
  }
}
namespace Windows.Media.SpeechSynthesis {
  public sealed class SpeechSynthesisStream : IClosable, IContentTypeProvider, IInputStream, IOutputStream, IRandomAccessStream, IRandomAccessStreamWithContentType, ITimedMetadataTrackProvider {
    IVectorView<TimedMetadataTrack> TimedMetadataTracks { get; }
  }
  public sealed class SpeechSynthesizer : IClosable {
    SpeechSynthesizerOptions Options { get; }
  }
  public sealed class SpeechSynthesizerOptions
}
namespace Windows.Media.Streaming.Adaptive {
  public sealed class AdaptiveMediaSource : IClosable, IMediaSource {
    IReference<TimeSpan> DesiredSeekableWindowSize { get; set; }
    AdaptiveMediaSourceDiagnostics Diagnostics { get; }
    IReference<TimeSpan> MaxSeekableWindowSize { get; }
    IReference<TimeSpan> MinLiveOffset { get; }
    void Close();
    AdaptiveMediaSourceCorrelatedTimes GetCorrelatedTimes();
  }
  public sealed class AdaptiveMediaSourceCorrelatedTimes
  public sealed class AdaptiveMediaSourceCreationResult {
    HResult ExtendedError { get; }
  }
  public sealed class AdaptiveMediaSourceDiagnosticAvailableEventArgs
  public sealed class AdaptiveMediaSourceDiagnostics
  public enum AdaptiveMediaSourceDiagnosticType
  public sealed class AdaptiveMediaSourceDownloadBitrateChangedEventArgs {
    AdaptiveMediaSourceDownloadBitrateChangedReason Reason { get; }
  }
  public enum AdaptiveMediaSourceDownloadBitrateChangedReason
  public sealed class AdaptiveMediaSourceDownloadCompletedEventArgs {
    IReference<TimeSpan> Position { get; }
    int RequestId { get; }
    AdaptiveMediaSourceDownloadStatistics Statistics { get; }
  }
  public sealed class AdaptiveMediaSourceDownloadFailedEventArgs {
    HResult ExtendedError { get; }
    IReference<TimeSpan> Position { get; }
    int RequestId { get; }
    AdaptiveMediaSourceDownloadStatistics Statistics { get; }
  }
  public sealed class AdaptiveMediaSourceDownloadRequestedEventArgs {
    IReference<TimeSpan> Position { get; }
    int RequestId { get; }
  }
  public sealed class AdaptiveMediaSourceDownloadStatistics
}
namespace Windows.Networking.NetworkOperators {
  public sealed class MobileBroadbandAccount {
    Uri AccountExperienceUrl { get; }
  }
  public sealed class MobileBroadbandDeviceInformation {
    string SimGid1 { get; }
    string SimPnn { get; }
    string SimSpn { get; }
  }
}
namespace Windows.Networking.PushNotifications {
  public static class PushNotificationChannelManager {
    public static PushNotificationChannelManagerForUser GetDefault();
  }
  public sealed class PushNotificationChannelManagerForUser {
    IAsyncOperation<PushNotificationChannel> CreateRawPushNotificationChannelWithAlternateKeyForApplicationAsync(IBuffer appServerKey, string channelId);
    IAsyncOperation<PushNotificationChannel> CreateRawPushNotificationChannelWithAlternateKeyForApplicationAsync(IBuffer appServerKey, string channelId, string appId);
  }
  public sealed class RawNotification {
    string ChannelId { get; }
    IMapView<string, string> Headers { get; }
  }
}
namespace Windows.Perception.Spatial {
  public sealed class SpatialEntity
  public sealed class SpatialEntityAddedEventArgs
  public sealed class SpatialEntityRemovedEventArgs
  public sealed class SpatialEntityStore
  public sealed class SpatialEntityUpdatedEventArgs
  public sealed class SpatialEntityWatcher
  public enum SpatialEntityWatcherStatus
  public enum SpatialLookDirectionRange
  public enum SpatialMovementRange
  public sealed class SpatialStageFrameOfReference
}
namespace Windows.Perception.Spatial.Surfaces {
  public sealed class SpatialSurfaceObserver {
    public static bool IsSupported();
  }
}
namespace Windows.Security.Authentication.Identity.Provider {
  public enum SecondaryAuthenticationFactorAuthenticationStage {
    CheckingDevicePresence = 8,
  }
  public enum SecondaryAuthenticationFactorDeviceCapabilities : uint {
    CloseRangeDataTransmission = (uint)64,
  }
  public enum SecondaryAuthenticationFactorDevicePresence
  public enum SecondaryAuthenticationFactorDevicePresenceMonitoringMode
  public enum SecondaryAuthenticationFactorDevicePresenceMonitoringRegistrationStatus
  public sealed class SecondaryAuthenticationFactorInfo {
    bool IsAuthenticationSupported { get; }
    SecondaryAuthenticationFactorDevicePresenceMonitoringMode PresenceMonitoringMode { get; }
    IAsyncAction UpdateDevicePresenceAsync(SecondaryAuthenticationFactorDevicePresence presenceState);
  }
  public sealed class SecondaryAuthenticationFactorRegistration {
    public static bool IsDevicePresenceMonitoringSupported();
    public static IAsyncOperation<SecondaryAuthenticationFactorDevicePresenceMonitoringRegistrationStatus> RegisterDevicePresenceMonitoringAsync(string deviceId, string deviceInstancePath, SecondaryAuthenticationFactorDevicePresenceMonitoringMode monitoringMode);
    public static IAsyncOperation<SecondaryAuthenticationFactorDevicePresenceMonitoringRegistrationStatus> RegisterDevicePresenceMonitoringAsync(string deviceId, string deviceInstancePath, SecondaryAuthenticationFactorDevicePresenceMonitoringMode monitoringMode, string deviceFriendlyName, string deviceModelNumber, IBuffer deviceConfigurationData);
    public static IAsyncAction UnregisterDevicePresenceMonitoringAsync(string deviceId);
  }
}
namespace Windows.Security.Authentication.OnlineId {
  public static class OnlineIdSystemAuthenticator
  public sealed class OnlineIdSystemAuthenticatorForUser
  public sealed class OnlineIdSystemIdentity
  public sealed class OnlineIdSystemTicketResult
  public enum OnlineIdSystemTicketStatus
}
namespace Windows.Security.Authentication.Web.Core {
  public sealed class WebTokenRequest {
    string CorrelationId { get; set; }
  }
}
namespace Windows.Security.Authentication.Web.Provider {
  public static class WebAccountManager {
    public static IAsyncOperation<WebAccount> AddWebAccountForUserAsync(User user, string webAccountId, string webAccountUserName, IMapView<string, string> props);
    public static IAsyncOperation<WebAccount> AddWebAccountForUserAsync(User user, string webAccountId, string webAccountUserName, IMapView<string, string> props, WebAccountScope scope);
    public static IAsyncOperation<WebAccount> AddWebAccountForUserAsync(User user, string webAccountId, string webAccountUserName, IMapView<string, string> props, WebAccountScope scope, string perUserWebAccountId);
    public static IAsyncOperation<IVectorView<WebAccount>> FindAllProviderWebAccountsForUserAsync(User user);
  }
  public sealed class WebAccountProviderTriggerDetails : IWebAccountProviderTokenObjects {
    User User { get; }
  }
}
namespace Windows.Security.Cryptography.Certificates {
  public sealed class CertificateExtension
  public sealed class CertificateRequestProperties {
    IVector<CertificateExtension> Extensions { get; }
    SubjectAlternativeNameInfo SubjectAlternativeName { get; }
    IVector<string> SuppressedDefaults { get; }
  }
  public sealed class SubjectAlternativeNameInfo {
    IVector<string> DistinguishedNames { get; }
    IVector<string> DnsNames { get; }
    IVector<string> EmailNames { get; }
    CertificateExtension Extension { get; }
    IVector<string> IPAddresses { get; }
    IVector<string> PrincipalNames { get; }
    IVector<string> Urls { get; }
  }
}
namespace Windows.Services.Cortana {
  public enum CortanaPermission
  public enum CortanaPermissionsChangeResult
  public sealed class CortanaPermissionsManager
}
namespace Windows.Services.Maps {
  public sealed class EnhancedWaypoint
  public sealed class ManeuverWarning
  public enum ManeuverWarningKind
  public enum ManeuverWarningSeverity
  public sealed class MapRoute {
    TimeSpan DurationWithoutTraffic { get; }
    TrafficCongestion TrafficCongestion { get; }
  }
  public static class MapRouteFinder {
    public static IAsyncOperation<MapRouteFinderResult> GetDrivingRouteFromEnhancedWaypointsAsync(IIterable<EnhancedWaypoint> waypoints);
    public static IAsyncOperation<MapRouteFinderResult> GetDrivingRouteFromEnhancedWaypointsAsync(IIterable<EnhancedWaypoint> waypoints, MapRouteDrivingOptions options);
  }
  public sealed class MapRouteLeg {
    TimeSpan DurationWithoutTraffic { get; }
    TrafficCongestion TrafficCongestion { get; }
  }
  public sealed class MapRouteManeuver {
    IVectorView<ManeuverWarning> Warnings { get; }
  }
  public static class MapService {
    public static MapServiceDataUsagePreference DataUsagePreference { get; set; }
  }
  public enum MapServiceDataUsagePreference
  public enum TrafficCongestion
  public enum WaypointKind
}
namespace Windows.Services.Maps.OfflineMaps {
  public sealed class OfflineMapPackage
  public sealed class OfflineMapPackageQueryResult
  public enum OfflineMapPackageQueryStatus
  public sealed class OfflineMapPackageStartDownloadResult
  public enum OfflineMapPackageStartDownloadStatus
  public enum OfflineMapPackageStatus
}
namespace Windows.Storage {
  public enum KnownFolderId {
    AllAppMods = 14,
    CurrentAppMods = 15,
  }
  public sealed class StorageLibrary {
    IAsyncOperation<bool> AreFolderSuggestionsAvailableAsync();
  }
  public enum StorageOpenOptions : uint {
    AllowReadersAndWriters = (uint)2,
  }
}
namespace Windows.System {
  public sealed class AppDiagnosticInfo
  public sealed class LauncherOptions : ILauncherViewOptions {
    bool LimitPickerToCurrentAppAndAppUriHandlers { get; set; }
  }
}
namespace Windows.System.Diagnostics {
  public sealed class SystemCpuUsage
  public sealed class SystemCpuUsageReport
  public sealed class SystemDiagnosticInfo
 public sealed class SystemMemoryUsage
  public sealed class SystemMemoryUsageReport
}
namespace Windows.System.Diagnostics.DevicePortal {
  public sealed class DevicePortalConnection
  public sealed class DevicePortalConnectionClosedEventArgs
  public enum DevicePortalConnectionClosedReason
  public sealed class DevicePortalConnectionRequestReceivedEventArgs
}
namespace Windows.System.Diagnostics.TraceReporting {
  public static class PlatformDiagnosticActions
  public enum PlatformDiagnosticActionState
  public enum PlatformDiagnosticEscalationType
  public enum PlatformDiagnosticEventBufferLatencies : uint
  public sealed class PlatformDiagnosticTraceInfo
  public enum PlatformDiagnosticTracePriority
  public sealed class PlatformDiagnosticTraceRuntimeInfo
  public enum PlatformDiagnosticTraceSlotState
  public enum PlatformDiagnosticTraceSlotType
}
namespace Windows.System.Profile {
  public static class EducationSettings
}
namespace Windows.System.RemoteSystems {
  public static class KnownRemoteSystemCapabilities
  public sealed class RemoteSystem {
    bool IsAvailableBySpatialProximity { get; }
    IAsyncOperation<bool> GetCapabilitySupportedAsync(string capabilityName);
    public static bool IsAuthorizationKindEnabled(RemoteSystemAuthorizationKind kind);
  }
  public enum RemoteSystemAuthorizationKind
  public sealed class RemoteSystemAuthorizationKindFilter : IRemoteSystemFilter
  public enum RemoteSystemDiscoveryType {
    SpatiallyProximal = 3,
  }
  public sealed class RemoteSystemSession : IClosable
  public sealed class RemoteSystemSessionAddedEventArgs
  public sealed class RemoteSystemSessionController
  public sealed class RemoteSystemSessionCreationResult
  public enum RemoteSystemSessionCreationStatus
  public sealed class RemoteSystemSessionDisconnectedEventArgs
  public enum RemoteSystemSessionDisconnectedReason
  public sealed class RemoteSystemSessionInfo
  public sealed class RemoteSystemSessionInvitation
  public sealed class RemoteSystemSessionInvitationListener
  public sealed class RemoteSystemSessionInvitationReceivedEventArgs
  public sealed class RemoteSystemSessionJoinRequest
  public sealed class RemoteSystemSessionJoinRequestedEventArgs
  public sealed class RemoteSystemSessionJoinResult
  public enum RemoteSystemSessionJoinStatus
  public sealed class RemoteSystemSessionMessageChannel
  public enum RemoteSystemSessionMessageChannelReliability
  public sealed class RemoteSystemSessionOptions
  public sealed class RemoteSystemSessionParticipant
  public sealed class RemoteSystemSessionParticipantAddedEventArgs
  public sealed class RemoteSystemSessionParticipantRemovedEventArgs
  public sealed class RemoteSystemSessionParticipantWatcher
  public enum RemoteSystemSessionParticipantWatcherStatus
  public sealed class RemoteSystemSessionRemovedEventArgs
  public sealed class RemoteSystemSessionUpdatedEventArgs
  public sealed class RemoteSystemSessionValueSetReceivedEventArgs
  public sealed class RemoteSystemSessionWatcher
  public enum RemoteSystemSessionWatcherStatus
}
namespace Windows.UI {
  public sealed class ColorHelper {
    public static string ToDisplayName(Color color);
  }
}
namespace Windows.UI.Composition {
  public enum AnimationDelayBehavior
  public sealed class CompositionCapabilities
  public class CompositionDrawingSurface : CompositionObject, ICompositionSurface {
    SizeInt32 SizeInt32 { get; }
    void Resize(SizeInt32 sizePixels);
    void Scroll(PointInt32 offset);
    void Scroll(PointInt32 offset, RectInt32 scrollRect);
    void ScrollWithClip(PointInt32 offset, RectInt32 clipRect);
    void ScrollWithClip(PointInt32 offset, RectInt32 clipRect, RectInt32 scrollRect);
  }
  public sealed class CompositionGraphicsDevice : CompositionObject {
    CompositionDrawingSurface CreateDrawingSurface2(SizeInt32 sizePixels, DirectXPixelFormat pixelFormat, DirectXAlphaMode alphaMode);
    CompositionVirtualDrawingSurface CreateVirtualDrawingSurface(SizeInt32 sizePixels, DirectXPixelFormat pixelFormat, DirectXAlphaMode alphaMode);
  }
  public class CompositionVirtualDrawingSurface : CompositionDrawingSurface
  public sealed class Compositor : IClosable {
    CompositionBackdropBrush CreateHostBackdropBrush();
  }
  public interface ICompositionColorSpaceTarget
  public class KeyFrameAnimation : CompositionAnimation {
    AnimationDelayBehavior DelayBehavior { get; set; }
  }
  public class Visual : CompositionObject {
    Visual ParentForTransform { get; set; }
    Vector3 RelativeOffsetAdjustment { get; set; }
    Vector2 RelativeSizeAdjustment { get; set; }
  }
  public sealed class VisualCapturePartner : CompositionObject, IAsyncInfo, IAsyncOperation<ICompositionSurface>
}
namespace Windows.UI.Composition.Interactions {
  public sealed class CompositionConditionalValue : CompositionObject
  public sealed class InteractionTracker : CompositionObject {
    void ConfigureCenterPointXInertiaModifiers(IIterable<CompositionConditionalValue> conditionalValues);
    void ConfigureCenterPointYInertiaModifiers(IIterable<CompositionConditionalValue> conditionalValues);
  }
  public class VisualInteractionSource : CompositionObject, ICompositionInteractionSource {
    Vector3 DeltaPosition { get; }
    float DeltaScale { get; }
    Vector3 Position { get; }
    Vector3 PositionVelocity { get; }
    float Scale { get; }
    float ScaleVelocity { get; }
    void ConfigureCenterPointXModifiers(IIterable<CompositionConditionalValue> conditionalValues);
    void ConfigureCenterPointYModifiers(IIterable<CompositionConditionalValue> conditionalValues);
    void ConfigureDeltaPositionXModifiers(IIterable<CompositionConditionalValue> conditionalValues);
    void ConfigureDeltaPositionYModifiers(IIterable<CompositionConditionalValue> conditionalValues);
    void ConfigureDeltaScaleModifiers(IIterable<CompositionConditionalValue> conditionalValues);
  }
}
namespace Windows.UI.Core {
  public sealed class ComponentDisplayInformation
  public sealed class CoreWindow : ICorePointerRedirector, ICoreWindow {
    event TypedEventHandler<CoreWindow, object> ResizeCompleted;
    event TypedEventHandler<CoreWindow, object> ResizeStarted;
  }
  public sealed class SystemNavigationCloseRequestedEventArgs
  public sealed class SystemNavigationManager {
    event TypedEventHandler<SystemNavigationManager, SystemNavigationCloseRequestedEventArgs> CloseRequested;
  }
}
namespace Windows.UI.Input {
  public sealed class RadialController {
    event TypedEventHandler<RadialController, RadialControllerButtonHoldingEventArgs> ButtonHolding;
    event TypedEventHandler<RadialController, RadialControllerButtonPressedEventArgs> ButtonPressed;
    event TypedEventHandler<RadialController, RadialControllerButtonReleasedEventArgs> ButtonReleased;
  }
  public sealed class RadialControllerButtonClickedEventArgs {
    SimpleHapticsController SimpleHapticsController { get; }
  }
  public sealed class RadialControllerButtonHoldingEventArgs
  public sealed class RadialControllerButtonPressedEventArgs
  public sealed class RadialControllerButtonReleasedEventArgs
  public sealed class RadialControllerConfiguration {
    RadialController ActiveControllerWhenMenuIsSuppressed { get; set; }
    bool IsMenuSuppressed { get; set; }
  }
  public sealed class RadialControllerControlAcquiredEventArgs {
    bool IsButtonPressed { get; }
    SimpleHapticsController SimpleHapticsController { get; }
  }
  public sealed class RadialControllerMenuItem {
    public static RadialControllerMenuItem CreateFromFontGlyph(string displayText, string glyph, string fontFamily);
    public static RadialControllerMenuItem CreateFromFontGlyph(string displayText, string glyph, string fontFamily, Uri fontUri);
  }
  public sealed class RadialControllerRotationChangedEventArgs {
    bool IsButtonPressed { get; }
    SimpleHapticsController SimpleHapticsController { get; }
  }
  public sealed class RadialControllerScreenContactContinuedEventArgs {
    bool IsButtonPressed { get; }
    SimpleHapticsController SimpleHapticsController { get; }
  }
  public sealed class RadialControllerScreenContactEndedEventArgs
  public sealed class RadialControllerScreenContactStartedEventArgs {
    bool IsButtonPressed { get; }
    SimpleHapticsController SimpleHapticsController { get; }
  }
}
namespace Windows.UI.Input.Core {
  public sealed class RadialControllerIndependentInputSource
}
namespace Windows.UI.Input.Inking {
  public sealed class InkDrawingAttributes {
    bool IgnoreTilt { get; set; }
  }
  public enum InkHighContrastAdjustment
  public enum InkPersistenceFormat
  public sealed class InkPoint {
    public InkPoint(Point position, float pressure, float tiltX, float tiltY, ulong timestamp);
    float TiltX { get; }
    float TiltY { get; }
    ulong Timestamp { get; }
  }
  public sealed class InkPresenter {
    InkHighContrastAdjustment HighContrastAdjustment { get; set; }
  }
  public sealed class InkPresenterProtractor : IInkPresenterStencil
  public sealed class InkPresenterRuler : IInkPresenterStencil {
    bool AreTickMarksVisible { get; set; }
    bool IsCompassVisible { get; set; }
  }
  public enum InkPresenterStencilKind {
    Protractor = 2,
  }
  public sealed class InkStroke {
    uint Id { get; }
    IReference<TimeSpan> StrokeDuration { get; set; }
    IReference<DateTime> StrokeStartedTime { get; set; }
  }
  public sealed class InkStrokeBuilder {
    InkStroke CreateStrokeFromInkPoints(IIterable<InkPoint> inkPoints, Matrix3x2 transform, IReference<DateTime> strokeStartedTime, IReference<TimeSpan> strokeDuration);
  }
  public sealed class InkStrokeContainer : IInkStrokeContainer {
    InkStroke GetStrokeById(uint id);
    IAsyncOperationWithProgress<uint, uint> SaveAsync(IOutputStream outputStream, InkPersistenceFormat inkPersistenceFormat);
  }
}
namespace Windows.UI.Input.Inking.Analysis {
  public interface IInkAnalysisNode
  public interface IInkAnalyzerFactory
  public enum InkAnalysisDrawingKind
  public sealed class InkAnalysisInkBullet : IInkAnalysisNode
  public sealed class InkAnalysisInkDrawing : IInkAnalysisNode
  public sealed class InkAnalysisInkWord : IInkAnalysisNode
  public sealed class InkAnalysisLine : IInkAnalysisNode
  public sealed class InkAnalysisListItem : IInkAnalysisNode
  public sealed class InkAnalysisNode : IInkAnalysisNode
  public enum InkAnalysisNodeKind
  public sealed class InkAnalysisParagraph : IInkAnalysisNode
  public sealed class InkAnalysisResult
  public sealed class InkAnalysisRoot : IInkAnalysisNode
  public enum InkAnalysisStatus
  public enum InkAnalysisStrokeKind
  public sealed class InkAnalysisWritingRegion : IInkAnalysisNode
  public sealed class InkAnalyzer
}
namespace Windows.UI.Input.Spatial {
  public sealed class SpatialInteractionController
  public sealed class SpatialInteractionControllerProperties
  public sealed class SpatialInteractionDetectedEventArgs {
    SpatialInteractionSource InteractionSource { get; }
  }
  public enum SpatialInteractionPressKind
  public sealed class SpatialInteractionSource {
    SpatialInteractionController Controller { get; }
    bool IsGraspSupported { get; }
    bool IsMenuSupported { get; }
    bool IsPointingSupported { get; }
    SpatialInteractionSourceState TryGetStateAtTimestamp(PerceptionTimestamp timestamp);
  }
  public sealed class SpatialInteractionSourceEventArgs {
    SpatialInteractionPressKind PressKind { get; }
  }
  public sealed class SpatialInteractionSourceState {
    SpatialInteractionControllerProperties ControllerProperties { get; }
    bool IsGrasped { get; }
    bool IsMenuPressed { get; }
    bool IsSelectPressed { get; }
    double SelectPressedValue { get; }
  }
  public sealed class SpatialPointerInteractionSourcePose
  public sealed class SpatialPointerPose {
    SpatialPointerInteractionSourcePose TryGetInteractionSourcePose(SpatialInteractionSource source);
  }
}
namespace Windows.UI.Notifications {
  public sealed class NotificationData
  public enum NotificationUpdateResult
  public sealed class ToastCollection
  public sealed class ToastCollectionManager
  public sealed class ToastNotification {
    NotificationData Data { get; set; }
  }
  public sealed class ToastNotificationHistoryChangedTriggerDetail {
    string CollectionId { get; }
  }
  public static class ToastNotificationManager {
    public static ToastNotificationManagerForUser GetDefault();
  }
  public sealed class ToastNotificationManagerForUser {
    IAsyncOperation<ToastNotificationHistory> GetHistoryForToastCollectionIdAsync(string collectionId);
    ToastCollectionManager GetToastCollectionManager();
    ToastCollectionManager GetToastCollectionManager(string appId);
    IAsyncOperation<ToastNotifier> GetToastNotifierForToastCollectionIdAsync(string collectionId);
  }
  public sealed class ToastNotifier {
    NotificationUpdateResult Update(NotificationData data, string tag);
    NotificationUpdateResult Update(NotificationData data, string tag, string group);
  }
}
namespace Windows.UI.StartScreen {
  public sealed class StartScreenManager
}
namespace Windows.UI.Text {
  public sealed class RichEditTextDocument : ITextDocument
  public enum TextDecorations : uint
  public enum TextGetOptions : uint {
    UseLf = (uint)16777216,
  }
}
namespace Windows.UI.ViewManagement {
  public sealed class ApplicationView {
    ApplicationViewMode ViewMode { get; }
    bool IsViewModeSupported(ApplicationViewMode viewMode);
    IAsyncOperation<bool> TryConsolidateAsync();
    IAsyncOperation<bool> TryEnterViewModeAsync(ApplicationViewMode viewMode);
    IAsyncOperation<bool> TryEnterViewModeAsync(ApplicationViewMode viewMode, ViewModePreferences viewModePreferences);
  }
  public sealed class ApplicationViewConsolidatedEventArgs {
    bool IsAppInitiated { get; }
  }
  public enum ApplicationViewMode
  public static class ApplicationViewSwitcher {
    public static IAsyncOperation<bool> TryShowAsViewModeAsync(int viewId, ApplicationViewMode viewMode);
    public static IAsyncOperation<bool> TryShowAsViewModeAsync(int viewId, ApplicationViewMode viewMode, ViewModePreferences viewModePreferences);
  }
  public sealed class UISettings {
    bool AdvancedEffectsEnabled { get; }
   event TypedEventHandler<UISettings, object> AdvancedEffectsEnabledChanged;
  }
  public sealed class ViewModePreferences
  public enum ViewSizePreference {
    Custom = 6,
  }
}
namespace Windows.UI.WebUI {
  public sealed class WebUIContactPanelActivatedEventArgs : IActivatedEventArgs, IActivatedEventArgsDeferral, IActivatedEventArgsWithUser, IContactPanelActivatedEventArgs
  public sealed class WebUILockScreenComponentActivatedEventArgs : IActivatedEventArgs, IActivatedEventArgsDeferral
}
namespace Windows.UI.Xaml {
  public class Application {
    ApplicationHighContrastAdjustment HighContrastAdjustment { get; set; }
  }
  public enum ApplicationHighContrastAdjustment : uint
  public sealed class BringIntoViewOptions
  public enum ElementHighContrastAdjustment : uint
  public class FrameworkElement : UIElement {
    public static void DeferTree(DependencyObject element);
  }
  public class UIElement : DependencyObject {
    public static RoutedEvent GettingFocusEvent { get; }
    ElementHighContrastAdjustment HighContrastAdjustment { get; set; }
    public static DependencyProperty HighContrastAdjustmentProperty { get; }
    double KeyTipHorizontalOffset { get; set; }
    public static DependencyProperty KeyTipHorizontalOffsetProperty { get; }
    KeyTipPlacementMode KeyTipPlacementMode { get; set; }
    public static DependencyProperty KeyTipPlacementModeProperty { get; }
    double KeyTipVerticalOffset { get; set; }
    public static DependencyProperty KeyTipVerticalOffsetProperty { get; }
    IVector<XamlLight> Lights { get; }
    public static DependencyProperty LightsProperty { get; }
    public static RoutedEvent LosingFocusEvent { get; }
    public static RoutedEvent NoFocusCandidateFoundEvent { get; }
    KeyboardNavigationMode TabFocusNavigation { get; set; }
    public static DependencyProperty TabFocusNavigationProperty { get; }
    XYFocusNavigationStrategy XYFocusDownNavigationStrategy { get; set; }
    public static DependencyProperty XYFocusDownNavigationStrategyProperty { get; }
    XYFocusKeyboardNavigationMode XYFocusKeyboardNavigation { get; set; }
    public static DependencyProperty XYFocusKeyboardNavigationProperty { get; }
    XYFocusNavigationStrategy XYFocusLeftNavigationStrategy { get; set; }
    public static DependencyProperty XYFocusLeftNavigationStrategyProperty { get; }
    XYFocusNavigationStrategy XYFocusRightNavigationStrategy { get; set; }
    public static DependencyProperty XYFocusRightNavigationStrategyProperty { get; }
    XYFocusNavigationStrategy XYFocusUpNavigationStrategy { get; set; }
    public static DependencyProperty XYFocusUpNavigationStrategyProperty { get; }
    event TypedEventHandler<UIElement, GettingFocusEventArgs> GettingFocus;
    event TypedEventHandler<UIElement, LosingFocusEventArgs> LosingFocus;
    event TypedEventHandler<UIElement, NoFocusCandidateFoundEventArgs> NoFocusCandidateFound;
    void StartBringIntoView();
    void StartBringIntoView(BringIntoViewOptions options);
  }
  public sealed class Window {
    Compositor Compositor { get; }
  }
}
namespace Windows.UI.Xaml.Automation {
  public sealed class AutomationElementIdentifiers {
    public static AutomationProperty CultureProperty { get; }
  }
  public sealed class AutomationProperties {
    public static DependencyProperty CultureProperty { get; }
    public static int GetCulture(DependencyObject element);
    public static void SetCulture(DependencyObject element, int value);
  }
}
namespace Windows.UI.Xaml.Automation.Peers {
  public class AutomationPeer : DependencyObject {
    int GetCulture();
    virtual int GetCultureCore();
  }
  public sealed class MapControlAutomationPeer : FrameworkElementAutomationPeer, IScrollProvider, ITransformProvider, ITransformProvider2 {
    bool CanMove { get; }
    bool CanResize { get; }
    bool CanRotate { get; }
    bool CanZoom { get; }
    double MaxZoom { get; }
    double MinZoom { get; }
    double ZoomLevel { get; }
    void Move(double x, double y);
    void Resize(double width, double height);
    void Rotate(double degrees);
    void Zoom(double zoom);
    void ZoomByUnit(ZoomUnit zoomUnit);
  }
}
namespace Windows.UI.Xaml.Controls {
  public class BitmapIcon : IconElement {
    bool ShowAsMonochrome { get; set; }
    public static DependencyProperty ShowAsMonochromeProperty { get; }
  }
  public class ComboBox : Selector {
    ComboBoxSelectionChangedTrigger SelectionChangedTrigger { get; set; }
    public static DependencyProperty SelectionChangedTriggerProperty { get; }
  }
  public enum ComboBoxSelectionChangedTrigger
  public class ContentDialog : ContentControl {
    ICommand CloseButtonCommand { get; set; }
    object CloseButtonCommandParameter { get; set; }
    public static DependencyProperty CloseButtonCommandParameterProperty { get; }
    public static DependencyProperty CloseButtonCommandProperty { get; }
    Style CloseButtonStyle { get; set; }
    public static DependencyProperty CloseButtonStyleProperty { get; }
    string CloseButtonText { get; set; }
    public static DependencyProperty CloseButtonTextProperty { get; }
    ContentDialogButton DefaultButton { get; set; }
    public static DependencyProperty DefaultButtonProperty { get; }
    Style PrimaryButtonStyle { get; set; }
    public static DependencyProperty PrimaryButtonStyleProperty { get; }
    Style SecondaryButtonStyle { get; set; }
    public static DependencyProperty SecondaryButtonStyleProperty { get; }
    event TypedEventHandler<ContentDialog, ContentDialogButtonClickEventArgs> CloseButtonClick;
  }
  public enum ContentDialogButton
  public class Control : FrameworkElement {
    Uri DefaultStyleResourceUri { get; set; }
    public static DependencyProperty DefaultStyleResourceUriProperty { get; }
    public static DependencyProperty IsTemplateKeyTipTargetProperty { get; }
    public static bool GetIsTemplateKeyTipTarget(DependencyObject element);
    public static void SetIsTemplateKeyTipTarget(DependencyObject element, bool value);
  }
  public sealed class FocusEngagedEventArgs : RoutedEventArgs {
    bool Handled { get; set; }
  }
  public class Frame : ContentControl, INavigate {
    void SetNavigationState(string navigationState, bool suppressNavigate);
  }
  public class InkToolbar : Control {
    InkToolbarButtonFlyoutPlacement ButtonFlyoutPlacement { get; set; }
    public static DependencyProperty ButtonFlyoutPlacementProperty { get; }
    bool IsStencilButtonChecked { get; set; }
    public static DependencyProperty IsStencilButtonCheckedProperty { get; }
    Orientation Orientation { get; set; }
    public static DependencyProperty OrientationProperty { get; }
    event TypedEventHandler<InkToolbar, InkToolbarIsStencilButtonCheckedChangedEventArgs> IsStencilButtonCheckedChanged;
    InkToolbarMenuButton GetMenuButton(InkToolbarMenuKind menu);
  }
  public enum InkToolbarButtonFlyoutPlacement
  public class InkToolbarEraserButton : InkToolbarToolButton {
    bool IsClearAllVisible { get; set; }
    public static DependencyProperty IsClearAllVisibleProperty { get; }
  }
  public class InkToolbarFlyoutItem : ButtonBase
  public enum InkToolbarFlyoutItemKind
  public sealed class InkToolbarIsStencilButtonCheckedChangedEventArgs
  public class InkToolbarMenuButton : ToggleButton
  public enum InkToolbarMenuKind
  public class InkToolbarStencilButton : InkToolbarMenuButton
  public enum InkToolbarStencilKind
  public class ListViewBase : Selector, ISemanticZoomInformation {
    ConnectedAnimation PrepareConnectedAnimation(string key, object item, string elementName);
    IAsyncOperation<bool> TryStartConnectedAnimationAsync(ConnectedAnimation animation, object item, string elementName);
  }
  public class MenuFlyoutItem : MenuFlyoutItemBase {
    IconElement Icon { get; set; }
    public static DependencyProperty IconProperty { get; }
  }
  public sealed class MenuFlyoutSubItem : MenuFlyoutItemBase {
    IconElement Icon { get; set; }
    public static DependencyProperty IconProperty { get; }
  }
  public class RichEditBox : Control {
    int MaxLength { get; set; }
    public static DependencyProperty MaxLengthProperty { get; }
    SolidColorBrush SelectionHighlightColorWhenNotFocused { get; set; }
    public static DependencyProperty SelectionHighlightColorWhenNotFocusedProperty { get; }
  }
  public sealed class RichEditBoxTextChangingEventArgs {
    bool IsContentChanging { get; }
  }
  public sealed class RichTextBlock : FrameworkElement {
    TextDecorations TextDecorations { get; set; }
    public static DependencyProperty TextDecorationsProperty { get; }
  }
  public sealed class TextBlock : FrameworkElement {
    TextDecorations TextDecorations { get; set; }
    public static DependencyProperty TextDecorationsProperty { get; }
  }
  public class TextBox : Control {
    SolidColorBrush SelectionHighlightColorWhenNotFocused { get; set; }
    public static DependencyProperty SelectionHighlightColorWhenNotFocusedProperty { get; }
  }
  public sealed class TextBoxTextChangingEventArgs {
    bool IsContentChanging { get; }
  }
}
namespace Windows.UI.Xaml.Controls.Maps {
  public sealed class MapBillboard : MapElement
  public sealed class MapContextRequestedEventArgs
  public sealed class MapControl : Control {
    MapProjection MapProjection { get; set; }
    public static DependencyProperty MapProjectionProperty { get; }
    MapStyleSheet StyleSheet { get; set; }
    public static DependencyProperty StyleSheetProperty { get; }
    Thickness ViewPadding { get; set; }
    public static DependencyProperty ViewPaddingProperty { get; }
    event TypedEventHandler<MapControl, MapContextRequestedEventArgs> MapContextRequested;
    IVectorView<MapElement> FindMapElementsAtOffset(Point offset, double radius);
    void GetLocationFromOffset(Point offset, AltitudeReferenceSystem desiredReferenceSystem, out Geopoint location);
    void StartContinuousPan(double horizontalPixelsPerSecond, double verticalPixelsPerSecond);
    void StopContinuousPan();
    IAsyncOperation<bool> TryPanAsync(double horizontalPixels, double verticalPixels);
    IAsyncOperation<bool> TryPanToAsync(Geopoint location);
  }
  public enum MapProjection
  public enum MapStyle {
    Custom = 7,
  }
  public sealed class MapStyleSheet : DependencyObject
}
namespace Windows.UI.Xaml.Controls.Primitives {
  public class FlyoutBase : DependencyObject {
    DependencyObject OverlayInputPassThroughElement { get; set; }
    public static DependencyProperty OverlayInputPassThroughElementProperty { get; }
  }
}
namespace Windows.UI.Xaml.Documents {
  public sealed class Hyperlink : Span {
    FocusState FocusState { get; }
    public static DependencyProperty FocusStateProperty { get; }
    XYFocusNavigationStrategy XYFocusDownNavigationStrategy { get; set; }
    public static DependencyProperty XYFocusDownNavigationStrategyProperty { get; }
    XYFocusNavigationStrategy XYFocusLeftNavigationStrategy { get; set; }
    public static DependencyProperty XYFocusLeftNavigationStrategyProperty { get; }
    XYFocusNavigationStrategy XYFocusRightNavigationStrategy { get; set; }
    public static DependencyProperty XYFocusRightNavigationStrategyProperty { get; }
    XYFocusNavigationStrategy XYFocusUpNavigationStrategy { get; set; }
    public static DependencyProperty XYFocusUpNavigationStrategyProperty { get; }
    event RoutedEventHandler GotFocus;
    event RoutedEventHandler LostFocus;
    bool Focus(FocusState value);
  }
  public class TextElement : DependencyObject {
    DependencyObject AccessKeyScopeOwner { get; set; }
    public static DependencyProperty AccessKeyScopeOwnerProperty { get; }
    bool IsAccessKeyScope { get; set; }
    public static DependencyProperty IsAccessKeyScopeProperty { get; }
    double KeyTipHorizontalOffset { get; set; }
    public static DependencyProperty KeyTipHorizontalOffsetProperty { get; }
    KeyTipPlacementMode KeyTipPlacementMode { get; set; }
    public static DependencyProperty KeyTipPlacementModeProperty { get; }
    double KeyTipVerticalOffset { get; set; }
    public static DependencyProperty KeyTipVerticalOffsetProperty { get; }
    TextDecorations TextDecorations { get; set; }
    public static DependencyProperty TextDecorationsProperty { get; }
    event TypedEventHandler<TextElement, AccessKeyDisplayDismissedEventArgs> AccessKeyDisplayDismissed;
    event TypedEventHandler<TextElement, AccessKeyDisplayRequestedEventArgs> AccessKeyDisplayRequested;
    event TypedEventHandler<TextElement, AccessKeyInvokedEventArgs> AccessKeyInvoked;
  }
}
namespace Windows.UI.Xaml.Hosting {
  public sealed class ElementCompositionPreview {
    public static CompositionPropertySet GetPointerPositionPropertySet(UIElement targetElement);
    public static void SetImplicitHideAnimation(UIElement element, ICompositionAnimationBase animation);
    public static void SetImplicitShowAnimation(UIElement element, ICompositionAnimationBase animation);
    public static void SetIsTranslationEnabled(UIElement element, bool value);
  }
}
namespace Windows.UI.Xaml.Input {
  public sealed class AccessKeyManager {
    public static bool AreKeyTipsEnabled { get; set; }
  }
  public sealed class FindNextElementOptions
  public enum FocusInputDeviceKind
  public sealed class FocusManager {
    public static DependencyObject FindFirstFocusableElement(DependencyObject searchScope);
    public static DependencyObject FindLastFocusableElement(DependencyObject searchScope);
    public static DependencyObject FindNextElement(FocusNavigationDirection focusNavigationDirection);
    public static DependencyObject FindNextElement(FocusNavigationDirection focusNavigationDirection, FindNextElementOptions focusNavigationOptions);
    public static bool TryMoveFocus(FocusNavigationDirection focusNavigationDirection, FindNextElementOptions focusNavigationOptions);
  }
  public sealed class GettingFocusEventArgs : RoutedEventArgs
  public enum KeyTipPlacementMode
  public sealed class LosingFocusEventArgs : RoutedEventArgs
  public sealed class NoFocusCandidateFoundEventArgs : RoutedEventArgs
  public enum XYFocusKeyboardNavigationMode
  public enum XYFocusNavigationStrategy
  public enum XYFocusNavigationStrategyOverride
}
namespace Windows.UI.Xaml.Markup {
  public sealed class XamlMarkupHelper
}
namespace Windows.UI.Xaml.Media {
  public sealed class LoadedImageSourceLoadCompletedEventArgs
  public enum LoadedImageSourceLoadStatus
  public sealed class LoadedImageSurface : IClosable, ICompositionSurface
  public class XamlCompositionBrushBase : Brush
  public class XamlLight : DependencyObject
}
namespace Windows.UI.Xaml.Media.Animation {
  public sealed class ConnectedAnimation {
    bool IsScaleAnimationEnabled { get; set; }
    void SetAnimationComponent(ConnectedAnimationComponent component, ICompositionAnimationBase animation);
    bool TryStart(UIElement destination, IIterable<UIElement> coordinatedElements);
  }
  public enum ConnectedAnimationComponent
}
namespace Windows.UI.Xaml.Media.Imaging {
  public class SvgImageSource : ImageSource
  public sealed class SvgImageSourceFailedEventArgs
  public enum SvgImageSourceLoadStatus
  public sealed class SvgImageSourceOpenedEventArgs
}
namespace Windows.Media.Capture {
  public sealed class AppCaptureDurationGeneratedEventArgs
  public sealed class AppCaptureFileGeneratedEventArgs
  public enum AppCaptureMicrophoneCaptureState
  public sealed class AppCaptureMicrophoneCaptureStateChangedEventArgs
  public enum AppCaptureRecordingState
  public sealed class AppCaptureRecordingStateChangedEventArgs
  public sealed class AppCaptureRecordOperation
  public sealed class AppCaptureServices
  public sealed class AppCaptureSettings {
    bool IsCursorImageCaptureEnabled { get; set; }
    bool IsEchoCancellationEnabled { get; set; }
  }
  public sealed class AppCaptureState
}
namespace Windows.Security.EnterpriseData {
  public static class FileProtectionManager {
    public static IAsyncOperation<FileProtectionInfo> UnprotectAsync(IStorageItem target);
    public static IAsyncOperation<FileProtectionInfo> UnprotectAsync(IStorageItem target, FileUnprotectOptions options);
  }
  public sealed class FileUnprotectOptions
  public sealed class ProtectionPolicyManager {
    public static string PrimaryManagedIdentity { get; }
    public static string GetPrimaryManagedIdentityForIdentity(string identity);
    public static IAsyncOperation<bool> IsFileProtectionRequiredAsync(IStorageItem target, string identity);
    public static IAsyncOperation<bool> IsFileProtectionRequiredForNewFileAsync(IStorageFolder parentFolder, string identity, string desiredName);
    public static bool IsRoamableProtectionEnabled(string identity);
    public static IAsyncOperation<ProtectionPolicyEvaluationResult> RequestAccessAsync(string sourceIdentity, string targetIdentity, ProtectionPolicyAuditInfo auditInfo, string messageFromApp, ProtectionPolicyRequestAccessBehavior behavior);
    public static IAsyncOperation<ProtectionPolicyEvaluationResult> RequestAccessForAppAsync(string sourceIdentity, string appPackageFamilyName, ProtectionPolicyAuditInfo auditInfo, string messageFromApp, ProtectionPolicyRequestAccessBehavior behavior);
    public static IAsyncOperation<ProtectionPolicyEvaluationResult> RequestAccessToFilesForAppAsync(IIterable<IStorageItem> sourceItemList, string appPackageFamilyName, ProtectionPolicyAuditInfo auditInfo);
    public static IAsyncOperation<ProtectionPolicyEvaluationResult> RequestAccessToFilesForAppAsync(IIterable<IStorageItem> sourceItemList, string appPackageFamilyName, ProtectionPolicyAuditInfo auditInfo, string messageFromApp, ProtectionPolicyRequestAccessBehavior behavior);
    public static IAsyncOperation<ProtectionPolicyEvaluationResult> RequestAccessToFilesForProcessAsync(IIterable<IStorageItem> sourceItemList, uint processId, ProtectionPolicyAuditInfo auditInfo);
    public static IAsyncOperation<ProtectionPolicyEvaluationResult> RequestAccessToFilesForProcessAsync(IIterable<IStorageItem> sourceItemList, uint processId, ProtectionPolicyAuditInfo auditInfo, string messageFromApp, ProtectionPolicyRequestAccessBehavior behavior);
  }
}
namespace Windows.Services.Store {
  public sealed class StoreContext {
    IAsyncOperation<StoreProductResult> FindStoreProductForPackageAsync(IIterable<string> productKinds, Package package);
  }
  public sealed class StoreSendRequestResult {
    HttpStatusCode HttpStatusCode { get; }
  }
}
namespace Windows.System.Profile {
  public static class SharedModeSettings {
    public static bool ShouldAvoidLocalStorage { get; }
  }
}
namespace Windows.Services.Cortana {
  public sealed class CortanaSettings
}
namespace Windows.System {
  public enum PowerState
  public static class ShutdownManager {
    public static void EnterPowerState(PowerState powerState);
    public static void EnterPowerState(PowerState powerState, TimeSpan wakeUpAfter);
    public static bool IsPowerStateSupported(PowerState powerState);
  }
}

API Removals:

namespace Windows.UI.Composition {
  public sealed class CompositionDrawingSurface : CompositionObject, ICompositionSurface {
  }
}
namespace Windows.UI.Composition.Interactions {
  public sealed class VisualInteractionSource : CompositionObject, ICompositionInteractionSource {
  }
}

The post Windows 10 SDK Preview Build 15003 Released appeared first on Building Apps for Windows.

ICYMI – Free Desktop Wallpaper Background, #WindowsDevDay, Build15003, Bluetooth

$
0
0

Big week in the Windows Developer world!

This week we have a new SDK, news about the Windows Developer Day – Windows 10 Creators Update, some curated C# tutorials, new Bluetooth features and if all that wasn’t enough, we created a desktop background featuring our favorite Visual Studio Shortcuts. We hope this desktop background can help both new and experienced developers learn a few tricks to help them become more efficient in Visual Studio. But first, here are last week’s updates:

Windows Developer Day – Windows 10 Creators Update

New Year, New Dev – C# basics

New Bluetooth Features and GATT services

Windows 10 SDK Preview Build 15003 Released

The Windows Desktop Wallpaper Background!

And last, but certainly not least, here is the Visual Studio Shortcuts desktop background we mentioned above. Download it here: http://wndw.ms/FkkoWL

And that’s it! Have a great weekend and feel free to tweet us if you have any questions.

Download Visual Studio to get started.

The Windows team would love to hear your feedback. Please keep the feedback coming using our Windows Developer UserVoice site. If you have a direct bug, please use the Windows Feedback tool built directly into Windows 10.

The post ICYMI – Free Desktop Wallpaper Background, #WindowsDevDay, Build15003, Bluetooth appeared first on Building Apps for Windows.

Announcing “UWPDesktop” NuGet Package Version 14393

$
0
0

The UWPDesktop NuGet package is here to improve the developer experience with Visual Studio when walking along the Desktop Bridge.

The Desktop Bridge allows you to call UWP APIs directly from your WinForms, WPF or VB application. You can use APIs such as Live tiles, notifications, App Services and many more!

Previously, calling UWP APIs from a converted app was a confusing process. You had to find and reference the right .dll or .winmd, and it often wasn’t obvious which one to choose.

For example, to use “await” on UWP types, you had to reference the System.Runtime.WindowsRuntime.dll (c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETCore\v4.5\
System.Runtime.WindowsRuntime.dll), which was actually from Windows 8.1 and therefore only worked in conjunction with “facade\windows.winmd” (c:\Program Files (x86)\Windows Kits\10\UnionMetadata\Facade\Windows.WinMD).


AppServiceConnectionStatus status = await connection.OpenAsync();

Confusing, right? The new way is much simpler – just include the latest UWPDesktop NuGet package to your project, and you’re ready to call any supported UWP API without needing additional references.

You have two options for installing the package:

  1. In Visual Studio, right-click on your project, select “Manage NuGet Packages,” and search for and install the UWPDesktop package (as shown in the screenshot below):

  2. Use the Package Manager Console

Install-Package UwpDesktop

Warnings for unsupported UWP APIs

Not all modern APIs can be called directly from your desktop application; for example, you still can’t use XAML or SecondaryTile in your WinForms app. The UWPDesktop NuGet package makes your life easier by raising a warning if you try and call an unsupported API.

For more information and to learn more about the UWPDesktop NuGet package and Desktop Bridge, check out the resources below.

Resources

The post Announcing “UWPDesktop” NuGet Package Version 14393 appeared first on Building Apps for Windows.

New Year, New Dev: Developing your idea into a UWP app

$
0
0

In the last post, we introduced you to a video series from Bob Tabor that teaches the fundamentals of C#. In this post, you’ll learn how to put those new (or re-sharpened) C# skills to use as we explore UWP (Universal Windows Platform) development in the Windows 10 Development for Absolute Beginners course from Bob Tabor. With little or no prior experience with XAML (pronounced “Zammal”), you’ll learn how to use XAML and C# to create amazing Windows 10 UWP applications, get those apps ready for publishing and see them run on UWP devices ranging from Xbox One and PC, to mobile and even Raspberry Pi.

Even if you’re an experienced UWP developer, just like in the last post, you may find that there are areas you’d like to brush up on. You can jump to any of the course’s 80 videos and also explore the companion sample code on GitHub.

Exploring the Course

The Ultimate Beginner Series course has two conceptual parts. In the first half, Bob Tabor explains the concepts, patterns and features of a UWP application. In the second half, you will build out four fleshed-out demo applications. From “File > New” to submitting your app to the Windows Store, these samples will get you ready to build and publish your first (or next) app!

First Half

Let’s take a high-level look at just some of the topics you’ll see in the front half of the course (to see the full list visit the course site).

  • Videos 17: Introduction to both XAML and what UWP (Universal Windows Application) is
  • Videos 818: Learn how to use different XAML Layouts
  • Videos 1924: App Navigation
  • Videos 2836: XAML Styling
  • Videos 3739: VisualStateManager and AdaptiveTriggers
  • Videos 4042: DataBinding, ObservableCollections and DataTemplates

There’s a lot there and there is even more to see, including lesson cheat-sheets, challenges and other useful material for learning and future reference.

Second Half

Now, let’s take a look at the four big samples that you’ll build as you move into the second part of the course. These videos will bring you through all the aspects of building, testing and publishing a UWP app.

  • SoundBoard (videos 4956)
    • Page Layout, creating models and data binding
    • Playing media with MediaElement
    • Implementing drag and drop
    • Working with app assets (iconography) and submitting to the Windows Store
  • Weather (videos 5762)
    • Working with a weather API
    • Using GPS and location APIs
    • Testing location in a Windows 10 Mobile emulator
    • Updating live tiles
  • Album Cover Match Game (videos 6370)
    • Access and use the device’s folder and file system
    • Layout, databinding and game setup/logic
    • Handling user input and persisting progress
    • Monetization with ads and In App Purchase
  • Hero Explorer (videos 7179)
    • Accessing a Web API
    • Databinding the object graph from the Web API results
    • Displaying that data in an adaptive layout

Make it through everything? Congrats, you are now ready to begin (or continue) your journey into the world of Windows 10 UWP development. This is not the end of great resources, there are many more available to you as you continue on your journey as a UWP developer (see resources section below). We look forward to seeing the wonderful UWP creations you bring to the Windows Store in 2017!

Resources

Download Visual Studio to get started.

The Windows team would love to hear your feedback. Please keep the feedback coming using our Windows Developer UserVoice site. If you have a direct bug, please use the Windows Feedback tool built directly into Windows 10.

The post New Year, New Dev: Developing your idea into a UWP app appeared first on Building Apps for Windows.

ICYMI – Tutorials, UWPDesktop Nuget, and MVP Updates

$
0
0

This week we have updates for both new and experienced developers alike! Take a look below to see the latest news from the Windows Developer team.

New year, new dev: Developing your idea into a UWP app

With little or no prior experience, you’ll learn how to use XAML and C# to create amazing Windows 10 UWP applications, get those apps ready for publishing and see them run on UWP devices ranging from Xbox One and PC, to mobile and even Raspberry Pi. Get started here:

Announcing UWPDesktop Nuget Package 14393

The UWPDesktop NuGet package is here to improve the developer experience with Visual Studio when walking along the Desktop Bridge.

The Desktop Bridge allows you to call UWP APIs directly from your WinForms, WPF or VB application. You can use APIs such as Live tiles, notifications, App Services and many more!

MVP Updates

Your Windows Developer MVPs have been working on some pretty amazing things. Check out the two below tweets to get a glimpse into the MVP world.

The Windows Desktop Wallpaper Background!

And finally, in case you missed it last week, here is the Visual Studio Shortcuts desktop background we mentioned above. Download it here: http://wndw.ms/FkkoWL

Download Visual Studio to get started.

The Windows team would love to hear your feedback. Please keep the feedback coming using our Windows Developer UserVoice site. If you have a direct bug, please use the Windows Feedback tool built directly into Windows 10.

The post ICYMI – Tutorials, UWPDesktop Nuget, and MVP Updates appeared first on Building Apps for Windows.

New Bluetooth features in Windows 10 Creators Update (a.k.a. GATT Server and friends)

$
0
0

This release is big on Bluetooth. If you’re familiar with Windows Bluetooth APIs, have been meaning to try them out, or if you’re just starting to dabble in IoT and wearables, this is a great time to take a fresh look at all things Bluetooth. To ensure the APIs we built out are functional and performant, we are working directly with Fitbit, Garmin and other device manufacturers and we would love your feedback as well.

There are three main features in this month’s Insider preview:

  • GATT Server
  • Bluetooth LE Peripheral
  • Unpaired Bluetooth LE device connectivity

A lot of the improvements are focused on Bluetooth LE, but we have improved Bluetooth audio functionality as well. While we made a lot of changes under the hood to ensure that all your devices talk nicely with each other, we also added a couple of new features.

Call Control API support comes to desktop. This means your VoIP apps can natively take advantage of Bluetooth headset functionality like pick up, hang up, hold, call waiting, etc. You will also experience higher-quality audio for voice, thanks to Wideband speech – coming soon to desktop. Now, Cortana will sound more lifelike and your Skype sessions will sound better than ever over Bluetooth.

Now, let’s break down the LE portions of this feature set.

GATT Server

GATT (or Generic ATTribute) logically describes how data is structured and must function in a Bluetooth LE device. The device that has the interesting data is the Server, and the device that uses that data to perform a function is known as the Client. For example, a Windows Phone (Client) reads data from a heart rate monitor (Server) to track that a user is working out optimally. Windows has traditionally been a GATT Client but with the Windows 10 Creators Update, Windows can operate as the Server as well. The hierarchy of classes in the example heart rate service is described below, but you can pick and choose any logical set of characteristics and descriptors to make your custom GATT service.

Your phone or PC has notification/user credential information that a wearable device does not have. For instance, when an incoming text message comes in, Windows can act as the GATT Server and notify a nearby wearable of the text’s arrival. Diagram 1 shows a sample service structure using Bluetooth classes implemented in this release.

Diagram 1: Sample Heart Rate GattDeviceService

For a more thorough discussion of GATT and all of its intricacies, take a look at the Bluetooth SIG page or the GATT tutorial on Adafruit.

Bluetooth LE Peripheral Role

In addition to GATT roles which determine the structure of the data, Bluetooth defines Generic Access Profile (GAP) roles as well.

These GAP roles specify which device advertises as connectable and which device does the connecting. To connect a device, Windows users generally go to the Settings page, find the device they want to connect and tap to connect. This action of connecting to remote devices implies that Windows is operating in the GAP Central role. However, there are often cases where remote devices such as smart locks need to be aware of Windows, or where you’re trying to connect two Windows devices. In such cases, we need to make sure that Windows can advertise as connectable. With the new Insider preview, apps can put the system in a state to advertise support for Bluetooth LE services. With Peripheral role and GATT Server combined, Windows can operate in all four combinations of GATT and GAP roles (color choices arbitrary, of course):

Diagram 2: Windows operating in all GATT and GAP roles

Unpaired Bluetooth LE device connectivity

Traditionally, Bluetooth LE devices needed to be paired with Windows to be accessed. This either forced the user to switch context to the Settings page, or caused developers to implement in-app pairing logic within the app. Unfortunately, there were even devices that didn’t support pairing, which necessitated ugly workarounds for the developer. All that is going to change now with the new Async GATT APIs.

In the new APIs, take a look at BluetoothLEDevice.GetGattServicesAsync(), GattDeviceService.GetCharacteristicsAsync() as well as GattCharacteristic.GetDescriptorsAsync() to get an idea for how to query a remote device without pairing.

What you need to get started

It’s all in the release preview Build and SDK, available to download here. Once you install the build, take a look at the classes that were described in the previous sections and have at it. We’re a little light on the documentation right now, but we will remedy that soon.

Does this mean my <insert wearable here> can get notifications?

GATT Server will open up a myriad of Bluetooth LE device-to-device scenarios that we think are super exciting! Why limit yourself to “Notifications”? Think remote authentication, smart locks, proximity and IoT! The world is your (wireless) oyster. But yes, developers can start enabling notifications now. However, consumers will only see this functionality lit up once Windows 10 Creators Update is released and their updated app is in the store.

If you would like us to go deeper on any of the topics in this post, please let us know in the comment sections below.

The post New Bluetooth features in Windows 10 Creators Update (a.k.a. GATT Server and friends) appeared first on Building Apps for Windows.


COM Server and OLE Document support for the Desktop Bridge

$
0
0

The Windows 10 Creators Update adds out-of-process (OOP) COM and OLE support for apps on the Desktop Bridge – a.k.a Packaged COM. Historically, Win32 apps would create COM extensions that other applications could use. For example, Microsoft Excel exposes its Excel.Application object so third-party applications can automate operations in Excel, leveraging its rich object model. But in the initial release of the Desktop Bridge with the Windows 10 Anniversary Update, an application cannot expose its COM extension points, as all registry entries are in its private hive and not exposed publicly to the system. Packaged COM provides a mechanism for COM and OLE entries to be declared in the manifest so they can be used by external applications. The underlying system handles the activation of the objects so they can be consumed by COM clients – all while still delivering on the Universal Windows Platform (UWP) promise of having a no-impact install and uninstall behavior.

How it works

Packaged COM entries are read from the manifest and stored in a new catalog that the UWP deployment system manages. This solves one of the main problems in COM in which any application or installer can write to the registry and corrupt the system, e.g. overwriting existing COM registrations or leaving behind registry entries upon uninstall.

At run-time when a COM call is made, i.e. calling CLSIDFromProgID() or CoCreateInstance(), the system first looks in the Packaged COM catalog and, if not found, falls back to the system registry. The COM server is then activated and runs OOP from the client application.

When to use Packaged COM

Packaged COM is very useful for apps that expose third-party extension points, but not all applications need it. If your application uses COM only for its own personal use, then you can rely on COM entries in the application’s private hive (Registry.dat) to support your app. All binaries in the same package have access to that registry, but any other apps on the system cannot see into your app’s private hive. Packaged COM allows you explicit control over which servers can be made public and used by third-parties.

Limitations

As the Packaged COM entries are stored in a separate catalog, applications that directly read the registry (e.g. calling RegOpenKeyEx() or RegEnumKeyEx()) will not see any entries and will fail. In these scenarios, applications providing extensions will need to work with their partners to go through COM API calls or provide another app-to-app communication mechanism.

Support is scoped to OOP servers, allowing two key requirements. First, OOP server supports means the Desktop Bridge can maintain its promise of serviceability. By running extensions OOP, the update manager can shut down the COM server and update all binaries because there are no dlls in use loaded by other processes. Second, OOP allows for a more robust extension mechanism. If an in-process COM server is hung, it will also hang the app; for OOP, the host app will still function and can decide how to handle the misbehaving OOP server.

We do not support every COM and OLE registration entry, for the full list of what we support please refer to the element hierarchy in the Windows 10 app package manifest on MSDN: https://docs.microsoft.com/uwp/schemas/appxpackage/uapmanifestschema/root-elements

Taking a closer look

The keys to enabling this functionality are the new manifest extension categories “windows.comServer” and “windows.comInterface.” The “windows.comServer” extension corresponds to the typical registration entries found under the CLSID (i.e.  HKEY_CLASSES_ROOT\CLSID\{MyClsId}) for an application supporting executable servers and their COM classes (including their OLE registration entries), surrogate servers, ProgIDs and TreatAs classes. The “windows.comInterface” extension corresponds to the typical registration entries under both the HKCR \Interface\{MyInterfaceID} and HKCR\Typelib\{MyTypelibID}, and supports Interfaces, ProxyStubs and Typelibs.

If you have registered COM classes before, these elements will look very familiar and straightforward to map from the existing registry keys into manifest entries. Here are a few examples.

Example #1: Registering an .exe COM server

In this first example, we will package ACDual for the Desktop Bridge. ACDual is an MFC OLE sample that shipped in earlier versions of Visual Studio. This app is an .exe COM server, ACDual.exe, with a Document CoClass that implements the IDualAClick interface. A client can then consume it. Below is a picture of the ACDual server and a simple WinForms client app that is using it:

Fig. 1 Client WinForms app automating AutoClick COM server

Store link: https://www.microsoft.com/store/apps/9nm1gvnkhjnf

GitHub link: https://github.com/Microsoft/DesktopBridgeToUWP-Samples/tree/master/Samples/PackagedComServer

Registry versus AppxManifest.xml

To understand how Packaged COM works, it helps to compare the typical entries in the registry with the Packaged COM entries in the manifest. For a minimal COM server, you typically need a CLSID with the LocalServer32 key, and an Interface pointing to the ProxyStub to handle cross-process marshaling. ProgIDs and TypeLibs make it easier to read and program against. Let’s take a look at each section and compare what the system registry looks like in comparison to Packaged COM snippets. First, let’s look at the following ProgID and CLSID entry that registers a server in the system registry:


; ProgID registration
[HKEY_CLASSES_ROOT\ACDual.Document]
@="AClick Document"
[HKEY_CLASSES_ROOT\ACDual.Document\CLSID]
@="{4B115281-32F0-11CF-AC85-444553540000}"
[HKEY_CLASSES_ROOT\ACDual.Document\DefaultIcon]
@=”C:\\VCSamples\\MFC\\ole\\acdual\\Release\\ACDual.exe,1”

; CLSID registration
[HKEY_CLASSES_ROOT\CLSID\{4B115281-32F0-11CF-AC85-444553540000}]
@="AClick Document"
[HKEY_CLASSES_ROOT\CLSID\{4B115281-32F0-11CF-AC85-444553540000}\InprocHandler32]
@="ole32.dll"
[HKEY_CLASSES_ROOT\CLSID\{4B115281-32F0-11CF-AC85-444553540000}\LocalServer32]
@="\"C:\\VCSamples\\MFC\\ole\\acdual\\Release\\ACDual.exe\""
[HKEY_CLASSES_ROOT\CLSID\{4B115281-32F0-11CF-AC85-444553540000}\ProgID]
@="ACDual.Document"

For comparison, the translation into the package manifest is straightforward. The ProgID and CLSID are supported through the windows.comServer extension, which must be under your app’s Application element along with all of your other extensions. Regarding ProgIDs, you can have multiple ProgID registrations for your server. Notice that there is no default value of the ProgID to provide a friendly name, as that information is stored with the CLSID registration and one of the goals of the manifest schema is to reduce duplication of information. The CLSID registration is enabled through the ExeServer element with an Executable attribute, which is a relative path to the .exe contained in the package. Package-relative paths solve one common problem with registering COM servers declaratively: in a .REG file, you don’t know where your executable is located. Often in a package, all the files are placed in the root of the package. The Class registration element is within the ExeServer element. You can specify one or more classes for an ExeServer.


<Applications>
    <Application Id="ACDual" Executable="ACDual.exe" EntryPoint="Windows.FullTrustApplication">
      <uap:VisualElements DisplayName="ACDual" .../>
    <Extensions>      
      <com:Extension Category="windows.comServer">
        <com:ComServer>
          <!-- CLSID -->
          <com:ExeServer Executable="ACDual.exe" DisplayName="AutoClick">
            <com:Class Id ="4B115281-32F0-11cf-AC85-444553540000" DisplayName="AClick Document" ProgId="AutoClick.Document.1" VersionIndependentProgId="AutoClick.Document">
            </com:Class>                       
          </com:ExeServer>      
          <!-- ProgId -->
          <com:ProgId Id="AutoClick.Document" CurrentVersion="AutoClick.Document.1" />
          <com:ProgId Id="AutoClick.Document.1" Clsid="4B115281-32F0-11cf-AC85-444553540000" />
        </com:ComServer>
      </com:Extension>

The next step is TypeLib and interface registration. In this example, the TypeLib is part of the main executable, and the interface uses the standard marshaler (oleaut32.dll) for its ProxyStub, so the registration is as follows:


[HKEY_CLASSES_ROOT\Interface\{0BDD0E81-0DD7-11CF-BBA8-444553540000}]
@="IDualAClick"
[HKEY_CLASSES_ROOT\Interface\{0BDD0E81-0DD7-11CF-BBA8-444553540000}\ProxyStubClsid32]
@="{00020424-0000-0000-C000-000000000046}"
[HKEY_CLASSES_ROOT\Interface\{0BDD0E81-0DD7-11CF-BBA8-444553540000}\TypeLib]
@="{4B115284-32F0-11CF-AC85-444553540000}"
"Version"="1.0"


;TypeLib registration
[HKEY_CLASSES_ROOT\TypeLib\{4B115284-32F0-11CF-AC85-444553540000}]
[HKEY_CLASSES_ROOT\TypeLib\{4B115284-32F0-11CF-AC85-444553540000}\1.0]
@="ACDual"
[HKEY_CLASSES_ROOT\TypeLib\{4B115284-32F0-11CF-AC85-444553540000}\1.0\0]
[HKEY_CLASSES_ROOT\TypeLib\{4B115284-32F0-11CF-AC85-444553540000}\1.0\0\win32]
@=" C:\\VCSamples\\MFC\\ole\\acdual\\Release\\AutoClik.TLB"
[HKEY_CLASSES_ROOT\TypeLib\{4B115284-32F0-11CF-AC85-444553540000}\1.0\FLAGS]
@="0"
[HKEY_CLASSES_ROOT\TypeLib\{4B115284-32F0-11CF-AC85-444553540000}\1.0\HELPDIR]
@=""

In translating this into the package manifest, the windows.comInterface extension supports one or more TypeLib, ProxyStub and interface registrations. Typically, it is placed under the Application element so it is easier to associate with the class registrations for readability, but it may also reside under the Package element. Also, note that we did not have to remember the CLSID of the universal marshaler (the key where ProxyStubClsid32 = {00020424-0000-0000-C000-000000000046}). This is simply a flag: UseUniversalMarshaler=”true”.


<com:Extension Category="windows.comInterface">
        <com:ComInterface>
          <!-- Interfaces -->
          <!-- IID_IDualAClick -->
          <com:Interface Id="0BDD0E81-0DD7-11cf-BBA8-444553540000" UseUniversalMarshaler="true">
            <com:TypeLib Id="4B115284-32F0-11cf-AC85-444553540000" VersionNumber="1.0" />
          </com:Interface>

          <!-- TypeLib -->
          <com:TypeLib Id="4B115284-32F0-11cf-AC85-444553540000">
            <com:Version DisplayName = "ACDual" VersionNumber="1.0" LocaleId="0" LibraryFlag="0">
              <com:Win32Path Path="AutoClik.tlb" />
            </com:Version>
          </com:TypeLib>
        </com:ComInterface>
      </com:Extension>
    </Extensions>
    </Application>
  </Applications>

Now you can initialize and use the server from any language that supports COM and dual interface OLE automation servers.

Example #2: OLE support

In this next example, we will package an existing OLE document server to demonstrate the capabilities of the Desktop Bridge and Packaged COM. The example we will use is the MFC Scribble sample app, which provides an insertable document type called Scribb Document. Scribble is a simple server that allows an OLE container, such as WordPad, to insert a Scribb Document.

Fig 2. WordPad hosting an embedded Scribb Document

Store Link: https://www.microsoft.com/store/apps/9n4xcm905zkj

GitHub Link: https://github.com/Microsoft/DesktopBridgeToUWP-Samples/tree/master/Samples/PackagedOleDocument

Registry versus AppxManifest.xml

There are many keys to specify various OLE attributes. Again, the magic here is that the platform has been updated to work with Packaged COM, and all you have to do is translate those keys into your manifest. In this example, the entries for Scribble include the ProgID, its file type associations and the CLSID with entries.


;SCRIBBLE.REG
;
;FileType Association using older DDEExec command to launch the app
[HKEY_CLASSES_ROOT\.SCB]
@=”Scribble.Document”
[HKEY_CLASSES_ROOT\Scribble.Document\shell\open\command]
@=”SCRIBBLE.EXE %1”


;ProgId
[HKEY_CLASSES_ROOT\Scribble.Document]
@= Scribb Document
[HKEY_CLASSES_ROOT\Scribble.Document\Insertable]
@=””
[HKEY_CLASSES_ROOT\Scribble.Document\CLSID]
@= “{7559FD90-9B93-11CE-B0F0-00AA006C28B3}}”


;ClsId with OLE entries
[HKEY_CLASSES_ROOT\CLSID\{7559FD90-9B93-11CE-B0F0-00AA006C28B3}]
@="Scribb Document"
[HKEY_CLASSES_ROOT\CLSID\{7559FD90-9B93-11CE-B0F0-00AA006C28B3}\AuxUserType]
[HKEY_CLASSES_ROOT\CLSID\{7559FD90-9B93-11CE-B0F0-00AA006C28B3}\AuxUserType\2]
@="Scribb"
[HKEY_CLASSES_ROOT\CLSID\{7559FD90-9B93-11CE-B0F0-00AA006C28B3}\AuxUserType\3]
@="Scribble"
[HKEY_CLASSES_ROOT\CLSID\{7559FD90-9B93-11CE-B0F0-00AA006C28B3}\DefaultIcon]
@="\"C:\\VC2015Samples\\scribble\\Release\\Scribble.exe\",1"
[HKEY_CLASSES_ROOT\CLSID\{7559FD90-9B93-11CE-B0F0-00AA006C28B3}\InprocHandler32]
@="ole32.dll"
[HKEY_CLASSES_ROOT\CLSID\{7559FD90-9B93-11CE-B0F0-00AA006C28B3}\Insertable]
@=""
[HKEY_CLASSES_ROOT\CLSID\{7559FD90-9B93-11CE-B0F0-00AA006C28B3}\LocalServer32]
@="\"C:\\VC2015Samples\\scribble\\Release\\Scribble.exe\""
[HKEY_CLASSES_ROOT\CLSID\{7559FD90-9B93-11CE-B0F0-00AA006C28B3}\MiscStatus]
@="32"
[HKEY_CLASSES_ROOT\CLSID\{7559FD90-9B93-11CE-B0F0-00AA006C28B3}\ProgID]
@="Scribble.Document"
[HKEY_CLASSES_ROOT\CLSID\{7559FD90-9B93-11CE-B0F0-00AA006C28B3}\Verb]
[HKEY_CLASSES_ROOT\CLSID\{7559FD90-9B93-11CE-B0F0-00AA006C28B3}\Verb\0]
@="&amp;Edit,0,2"
[HKEY_CLASSES_ROOT\CLSID\{7559FD90-9B93-11CE-B0F0-00AA006C28B3}\Verb\1]
@="&amp;Open,0,2"

First, let’s discuss the file type association. This is an extension that was supported in the first release of the Desktop Bridge extensions. Note that specifying the file type association here automatically adds support for the shell open command.

Next, let’s take a closer look at the ProgID and CLSID entries. In this case, the simple example only has a ProgID and no VersionIndependentProgID.

Most of the excitement in this example is underneath the CLSID where all the OLE keys live. The registry keys typically map to attributes of the class, such as:

  • Insertable key under either the ProgID or CLSID, mapping to the InsertableObject=”true” attribute
  • If the InprocHandler32 key is Ole32.dll, use the EnableOleDefaultHandler=”true” attribute
  • AuxUserType\2, mapping to ShortDisplayName
  • AuxUserType\3, mapping to the Application DisplayName
  • In cases where there were multiple values in a key, such as the OLE verbs, we’ve split those out into separate attributes. Here’s what the full manifest looks like:

  <Applications>
    <Application Id="Scribble" Executable="Scribble.exe" EntryPoint="Windows.FullTrustApplication">
      <uap:VisualElements DisplayName="Scribble App" .../>
      <Extensions>
        <uap:Extension Category="windows.fileTypeAssociation">
          <uap3:FileTypeAssociation Name="scb" Parameters="%1">
            <uap:SupportedFileTypes>
              <uap:FileType>.scb</uap:FileType>
            </uap:SupportedFileTypes>
          </uap3:FileTypeAssociation>
        </uap:Extension>

        <com:Extension Category="windows.comServer">
          <com:ComServer>
            <com:ExeServer Executable="Scribble.exe" DisplayName="Scribble">
              <!-- ClsId Registration -->
              <com:Class Id="7559FD90-9B93-11CE-B0F0-00AA006C28B3" DisplayName="Scribb Document" ShortDisplayName="Scribb" ProgId="Scribble.Document.1" VersionIndependentProgId ="Scribble.Document" EnableOleDefaultHandler="true" InsertableObject="true">
                <com:DefaultIcon Path="Scribble.exe" ResourceIndex="1" />
                <com:MiscStatus OleMiscFlag="32"/>
                <com:Verbs>
                  <com:Verb Id="0" DisplayName="&amp;Edit" AppendMenuFlag="0" OleVerbFlag="2" />
                  <com:Verb Id="1" DisplayName="&amp;Open" AppendMenuFlag="0" OleVerbFlag="2" />
                </com:Verbs>
              </com:Class>
            </com:ExeServer>
            <!-- ProgId Registration -->
            <com:ProgId Id="Scribble.Document" CurrentVersion="Scribble.Document.1" />
            <com:ProgId Id="Scribble.Document.1" Clsid="7559FD90-9B93-11CE-B0F0-00AA006C28B3" />
          </com:ComServer>
        </com:Extension>
      </Extensions>
    </Application>
  </Applications>

Additional support

The two examples above covered the most common cases of a COM server and an OLE document support. Packaged COM also supports additional servers like Surrogates and TreatAs classes. For more information, please refer to the element hierarchy in the Windows 10 app package manifest on MSDN: https://docs.microsoft.com/uwp/schemas/appxpackage/uapmanifestschema/root-elements

Conclusion

With UWP and Windows 10, applications can take advantage of several exciting new features while leveraging existing code investments in areas such as COM. With the Desktop Bridge platform and tooling enhancements, existing PC software can now be part of the UWP ecosystem and take advantage of the same set of new platform features and operating system capabilities.

For more information on the Desktop Bridge, please visit the Windows Dev Center.

Ready to submit your app to the Windows Store? Let us know!

Update – the Desktop App Converter has been updated to support new extensions available in the Windows 10 Creators Update, including support for Packaged COM.  Please get the latest converter at http://aka.ms/converter.

The post COM Server and OLE Document support for the Desktop Bridge appeared first on Building Apps for Windows.

ICYMI – Your weekly TL;DR

$
0
0

Building a new app this weekend? Check out last week’s Windows Developer updates before you dive in.

COM Server and OLE Document support for the Desktop Bridge

The Windows 10 Creators Update adds out-of-process (OOP) COM and OLE support for apps on the Desktop Bridge – a.k.a Packaged COM. Read more here to find out how it works.

Visual Studio 2017 – Now Ready for Your Windows Application Development Needs

Visual Studio 2017 is the most powerful Universal Windows Platform development environment. It brings unparalleled productivity improvements, a streamlined acquisition experience and enhanced debugging tools for UWP devs. Check it out.

Monetizing your app: Advertisement placement

App developers are free to place their ads in any part of their apps and many have done so to blend the ad experience into their app. We have seen that devs who take the time to do this get the best performance for their ads and earn more revenue. Want to learn how they do it?

The new Djay Pro App for Windows

Download Visual Studio to get started.

The Windows team would love to hear your feedback. Please keep the feedback coming using our Windows Developer UserVoice site. If you have a direct bug, please use the Windows Feedback tool built directly into Windows 10.

The post ICYMI – Your weekly TL;DR appeared first on Building Apps for Windows.

Monetizing your app: Use interstitial banner as fallback for interstitial video

$
0
0

Do you show ads while loading your app or between levels of your game (also known as interstitial ads)?

Microsoft Advertising now offers interstitial banners as an option for ads in your app. Interstitial ads have a higher monetization value, but have a lower fill rate in many markets. You can choose to use an interstitial banner when a video ad is not available.

Another option is to request both a video ad and an interstitial banner ad and show whichever ad is ready at the time of loading the app.

The code below is an example of how you can show either a video ad or a banner ad – whichever is ready first for you to load your app.

Add this to the cs file of the page that you want to load the interstitial ad:


//Add the Ads reference:
        using Microsoft.Advertising.WinRT.UI;

        //Initialize the ads:
        InterstitialAd videoInterstitialAd;
        InterstitialAd bannerAd;


        //Initialize the Adunits:
        var applicationId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx";
        // video adunit
        var videoAdunitId = "xxxxxxxx";
        // Interstitial banner adunit
        var interstitialAdunitId = "xxxxxxxxx";


        //Request the ads:
        // Instantiate an InterstitialAd
        videoInterstitialAd = new InterstitialAd();
        bannerAd = new InterstitialAd();

        // wire up all 4 events, see below for function template
        videoInterstitialAd.AdReady += OnVideoAdReady;
        videoInterstitialAd.ErrorOccurred += OnVideoError;
        videoInterstitialAd.Completed += OnVideoCompleted;
        videoInterstitialAd.Cancelled += OnVideoCancelled;
        bannerAd.AdReady += MyBannerAd_AdReady;

        // pre-fetch an ad 30-60 seconds before you need it
        videoInterstitialAd.RequestAd(AdType.Video, applicationId, videoAdunitId);
        bannerAd.RequestAd(AdType.Display, applicationId, interstitialAdunitId);

        //write the code for the events
        void OnVideoAdReady(object sender, object e)
        {
            if (isBannerAdAvailable)
            {
                return;
            }

              
     isVideoAdAvailable = true;
            videoInterstitialAd.Show();
            
            
        }

        void OnBannerAdReady(object sender, object e)
        {
           if (isVideoAdAvailable)
            {
                return;
            }

     isBannerAdAvailable = true;
            bannerAd.Show();
                   }

        void OnVideoError(object sender, AdErrorEventArgs e)
        {
            /* ... */
        }

        void OnVideoCompleted(object sender, object e)
        {
            /* ... */
        }

        void OnVideoCancelled(object sender, object e)
        {
            /* ... */
        }

Stay tuned over the next few weeks for additional tips to increase ad monetization.

The post Monetizing your app: Use interstitial banner as fallback for interstitial video appeared first on Building Apps for Windows.

Now available: Windows Developer training course on Desktop Bridge

$
0
0

We are happy to announce that the Microsoft Virtual Academy training course, Developer’s Guide to the Desktop Bridge, is now available on demand.

This video course, delivered by the Desktop Bridge Program Management team, aims to help developers understand the concepts and benefits of the Desktop Bridge tooling in the Windows 10 Universal Windows Platform. Watch the video and find the relevant sample code here to start bringing your desktop apps to the Windows Store and to take advantage of new Windows 10 features of the Universal Windows Platform in your WPF, WinForms, MFC or other type of Win32 apps.

Do you want to distribute your desktop application in the Windows Store? We cover that in the course. Do you want to take advantage of modern Windows 10 app-to-app features in your existing desktop application? We cover that in the course. Do you want to light-up Windows 10 features, and still distribute your app to Windows 7 users? We cover that, too. Modernizing your desktop app gradually with UWP components? We cover all of these and more in the course.

 There are eight modules:

  1. Intro to the Desktop Bridge
  2. Desktop App Converter
  3. Debugging and Testing Your Converted Apps
  4. Distributing Your Converted Apps
  5. Enhancing Desktop Applications with UWP Features
  6. Extending and Modernizing with UWP components
  7. What’s Next for the Desktop Bridge
  8. Post-Course Survey

For more information on the Desktop Bridge, please visit the Windows Dev Center.

Ready to submit your app to the Windows Store? Let us know!

Feedback or feature suggestions? Submit them on User Voice.

The post Now available: Windows Developer training course on Desktop Bridge appeared first on Building Apps for Windows.

Building a Telepresence App with HoloLens and Kinect

$
0
0

When does the history of mixed reality start? There are lots of suggestions, but 1977 always shows up as a significant year. That’s the year millions of children – many of whom would one day become the captains of Silicon Valley – first experienced something they wouldn’t be able to name for another decade or so.

The plea of an intergalactic princess that set off a Star Wars film franchise still going strong today: “Help me Obi-wan Kenobi, you’re my only hope.” It’s a fascinating validation of Marshal McLuhan’s dictum that the medium is the message. While the content of Princess Leia’s message is what we have an emotional attachment to, it is the medium of the holographic projection – today we would call it “augmented reality” or “mixed reality” – that we remember most vividly.

While this post is not going to provide an end-to-end blueprint for your own Princess Leia hologram, it will provide an overview of the technical terrain, point out some of the technical hurdles and point you in the right direction. You’ll still have to do a lot of work, but if you are interested in building a telepresence app for the HoloLens, this post will help you get there.

An external camera and network connection

The HoloLens is equipped with inside-out cameras. In order to create a telepresence app, however, you are going to need a camera that can face you and take videos of you – in other words, an outside-in camera. This post is going to use the Kinect v2 as an outside-in camera because it is widely available, very powerful and works well with Unity. You may choose to use a different camera that provides the features you need, or even use a smartphone device.

The HoloLens does not allow third-party hardware to plug into its mini-USB port, so you will also need some sort of networking layer to facilitate inter-device communication. For this post, we’ll be using the HoloToolkit’s sharing service – again, because it is just really convenient to do so and even has a dropdown menu inside of the Unity IDE for starting the service. You could, however, build your own custom socket solution as Mike Taulty did or use the Sharing with UNET code in the HoloToolkit Examples, which uses a Unity provided networking layer.

In the long run, the two choices that will most affect your telepresence solution are what sort of outside-in cameras you plan to support and what sort of networking layer you are going to use. These two choices will determine the scalability and flexibility of your solution.

Using the HoloLens-Kinect project

Many telepresence HoloLens apps today depend in some way on Michelle Ma’s open-source HoloLens-Kinect project. The genius of the app is that it glues together two libraries, the Unity Pro plugin package for Kinect with the HoloToolkit sharing service, and uses them in unintended ways to arrive at a solution.

Even though the Kinect plugin for Unity doesn’t work in UWP (and the Kinect cannot be plugged into a HoloLens device in any case), it can still run when deployed to Windows or when running in the IDE (in which case it is using the .NET 3.5 framework rather than the .NET Core framework). The trick, then, is to run the Kinect integration in Windows and then send messages to the HoloLens over a wireless network to get Kinect and the device working together.

On the network side, the HoloToolkit’s sharing service is primarily used to sync world anchors between different devices. It also requires that a service be instantiated on a PC to act as a communication bus between different devices. The sharing service doesn’t have to be used as intended, however. Since the service is already running on a PC, it can also be used to communicate between just the PC and a single HoloLens device. Moreover, it can be used to send more than just world anchors – it can really be adapted to send any sort of primitive values – for instance, Kinect joint positions.

To use Ma’s code, you need two separate Unity projects: one for running on a desktop PC and the other for running on the HoloLens. You will add the Kinect plugin package to the desktop app. You will add the sharing prefab from the HoloToolkit to both projects. In the app intended for the HoloLens, add the IP address of your machine to the Server Address field in the Sharing Stage component.

The two apps are largely identical. On the PC side, the app takes the body stream from the Kinect and sends the joint data to a script named BodyView.cs. BodyView creates spheres for each joint when it recognizes a new body and then repositions these joints whenever it gets updated Kinect.


private GameObject CreateBodyObject(ulong id)
{
    GameObject body = new GameObject("Body:" + id);
    for (int i = 0; i < 25; i++)
    {
        GameObject jointObj = GameObject.CreatePrimitive(PrimitiveType.Sphere);

        jointObj.transform.localScale = new Vector3(0.3f, 0.3f, 0.3f);
        jointObj.name = i.ToString();
        jointObj.transform.parent = body.transform;
    }
    return body;
}


private void RefreshBodyObject(Vector3[] jointPositions, GameObject bodyObj)
{
    for (int i = 0; i < 25; i++)
    {
        Vector3 jointPos = jointPositions[i];

        Transform jointObj = bodyObj.transform.FindChild(i.ToString());
        jointObj.localPosition = jointPos;
    }
}

As this is happening, another script called BodySender.cs intercepts this data and sends it to the sharing service. On the HoloLens device, a script named BodyReceiver.cs gets this intercepted joint data and passes it to its own instance of the BodyView class that animates the dot man made up of sphere primitives.

The code used to adapt the sharing service for transmitting Kinect data is contained in Ma’s CustomMessages2 class, which is really just a straight copy of the CustomMessages class from the HoloToolkit sharing example with a small modification that allows joint data to be sent and received:



public void SendBodyData(ulong trackingID, Vector3[] bodyData)
{
    // If we are connected to a session, broadcast our info
    if (this.serverConnection != null && this.serverConnection.IsConnected())
    {
        // Create an outgoing network message to contain all the info we want to send
        NetworkOutMessage msg = CreateMessage((byte)TestMessageID.BodyData);

        msg.Write(trackingID);

        foreach (Vector3 jointPos in bodyData)
        {
            AppendVector3(msg, jointPos);
        }

        // Send the message as a broadcast
        this.serverConnection.Broadcast(
            msg,
            MessagePriority.Immediate,
            MessageReliability.UnreliableSequenced,
            MessageChannel.Avatar);
    }
}

Moreover, once you understand how CustomMessages2 works, you can pretty much use it to send any kind of data you want.

Be one with The Force

Another thing the Kinect is very good at is gesture recognition. HoloLens currently supports a limited number of gestures and is constrained by what the inside-out cameras can see – mostly just your hands and fingers. You can use the Kinect-HoloLens integration above, however, to extend the HoloLens’ repertoire of gestures to include the user’s whole body.

For example, you can recognize when a user raises her hand above her head simply by comparing the relative positions of these two joints. Because this pose recognition only requires the joint data already transmitted by the sharing service and doesn’t need any additional Kinect data, it can be implemented completely on the receiver app running in the HoloLens.


private void DetectGesture(GameObject bodyObj)
{
    string HEAD = "3";
    string RIGHT_HAND = "11";

    // detect gesture involving the right hand and the head
    var head = bodyObj.transform.FindChild(HEAD);
    var rightHand = bodyObj.transform.FindChild(RIGHT_HAND);
        
    // if right hand is half a meter above head, do something
    if (rightHand.position.y > head.position.y + .5)
        _gestureCompleteObject.SetActive(true);
    else
        _gestureCompleteObject.SetActive(false);
}

In this sample, a hidden item is shown whenever the pose is detected. It is then hidden again whenever the user lowers her right arm.

The Kinect v2 has a rich literature on building custom gestures and even provides a tool for recording and testing gestures called the Visual Gesture Builder that you can use to create unique HoloLens experiences. Keep in mind that while many gesture solutions can be run directly in the HoloLens, in some cases, you may need to run your gesture detection routines on your desktop and then notify your HoloLens app of special gestures through a further modified CustomMessages2 script.

As fun as dot man is to play with, he isn’t really that attractive. If you are using the Kinect for gesture recognition, you can simply hide him by commenting a lot of the code in BodyView. Another way to go, though, is to use your Kinect data to animate a 3D character in the HoloLens. This is commonly known as avateering.

Unfortunately, you cannot use joint positions for avateering. The relative sizes of a human being’s limbs are often not going to be the same as those on your 3D model, especially if you are trying to animate models of fantastic creatures rather than just humans, so the relative joint positions will not work out. Instead, you need to use the rotation data of each joint. Rotation data, in the Kinect, is represented by an odd mathematical entity known as a quaternion.

Quaternions

Quaternions are to 3D programming what midichlorians are to the Star Wars universe: They are essential, they are poorly understood, and when someone tries to explain what they are, it just makes everyone else unhappy.

The Unity IDE doesn’t actually use quaternions. Instead it uses rotations around the X, Y and Z axes (pitch, yaw and roll) when you manipulate objects in the Scene Viewer. These are also known as Euler angles.

There are a few problems with this, however. Using the IDE, if I try to rotate the arm of my character using the yellow drag line, it will actually rotate both the green axis and the red axis along with it. Somewhat more alarming, as I try to rotate along just one axis, the Inspector windows show that my rotation around the Z axis is also affecting the rotation around the X and Y axes. The rotation angles are actually interlocked in such a way that even the order in which you make changes to the X, Y and Z rotation angles will affect the final orientation of the object you are rotating. Another interesting feature of Euler angles is that they can sometimes end up in a state known as gimbal locking.

These are some of the reasons that avateering is done using quaternions rather than Euler angles. To better visualize how the Kinect uses quaternions, you can replace dot man’s sphere primitives with arrow models (there are lots you can find in the asset store). Then, grab the orientation for each joint, convert it to a quaternion type (quaternions have four fields rather than the three in Euler angles) and apply it to the rotation property of each arrow.


private static Quaternion GetQuaternionFromJointOrientation(Kinect.JointOrientation jointOrientation)
{
    return new Quaternion(jointOrientation.Orientation.X, jointOrientation.Orientation.Y, jointOrientation.Orientation.Z, jointOrientation.Orientation.W);
}
private void RefreshBodyObject(Vector3[] jointPositions, Quaternion[] quaternions, GameObject bodyObj)
{
    for (int i = 0; i < 25; i++)
    {
        Vector3 jointPos = jointPositions[i];

        Transform jointObj = bodyObj.transform.FindChild(i.ToString());
        jointObj.localPosition = jointPos;
        jointObj.rotation = quaternions[i];
    }
}

These small changes result in the arrow man below who will actually rotate and bend his arms as you do.

For avateering, you basically do the same thing, except that instead of mapping identical arrows to each rotation, you need to map specific body parts to these joint rotations. This post is using the male model from Vitruvius avateering tools, but you are welcome to use any properly rigged character.

Once the character limbs are mapped to joints, they can be updated in pretty much the same way arrow man was. You need to iterate through the joints, find the mapped GameObject, and apply the correct rotation.


private Dictionary<int, string> RigMap = new Dictionary<int, string>()
{
    {0, "SpineBase"},
    {1, "SpineBase/SpineMid"},
    {2, "SpineBase/SpineMid/Bone001/Bone002"},
    // etc ...
    {22, "SpineBase/SpineMid/Bone001/ShoulderRight/ElbowRight/WristRight/ThumbRight"},
    {23, "SpineBase/SpineMid/Bone001/ShoulderLeft/ElbowLeft/WristLeft/HandLeft/HandTipLeft"},
    {24, "SpineBase/SpineMid/Bone001/ShoulderLeft/ElbowLeft/WristLeft/ThumbLeft"}
};

private void RefreshModel(Quaternion[] rotations)
{
    for (int i = 0; i < 25; i++)
    {
        if (RigMap.ContainsKey(i))
        {
            Transform rigItem = _model.transform.FindChild(RigMap[i]);
            rigItem.rotation = rotations[i];
        }
    }
}

This is a fairly simplified example, and depending on your character rigging, you may need to apply additional transforms on each joint to get them to the expected positions. Also, if you need really professional results, you might want to look into using inverse kinematics for your avateering solution.

If you want to play with working code, you can clone Wavelength’s Project-Infrared repository on github; it provides a complete avateering sample using the HoloToolkit sharing service. If it looks familiar to you, this is because it happens to be based on Michelle Ma’s HoloLens-Kinect code.

Looking at point cloud data

To get even closer to the Princess Leia hologram message, we can use the Kinect sensor to send point cloud data. Point clouds are a way to represent depth information collected by the Kinect. Following the pattern established in the previous examples, you will need a way to turn Kinect depth data into a point cloud on the desktop app. After that, you will use shared services to send this data to the HoloLens. Finally, on the HoloLens, the data needs to be reformed as a 3D point cloud hologram.

The point cloud example above comes from the Brekel Pro Point Cloud v2 tool, which allows you to read, record and modify point clouds with your Kinect.

The tool also includes a Unity package that replays point clouds, like the one above, in a Unity for Windows app. The final steps of transferring point cloud data over the HoloToolkit sharing server to HoloLens is an exercise that will be left to the reader.

If you are interested in a custom server solution, however, you can give the open source LiveScan 3D – HoloLens project a try.

HoloLens shared experiences and beyond

There are actually a lot of ways to orchestrate communication for the HoloLens of which, so far, we’ve mainly discussed just one. A custom socket solution may be better if you want to institute direct HoloLens-to-HoloLens communication without having to go through a PC-based broker like the sharing service.

Yet another option is to use a framework like WebRTC for your communication layer. This has the advantage of being an open specification, so there are implementations for a wide variety of platforms such as Android and iOS. It is also a communication platform that is used, in particular, for video chat applications, potentially giving you a way to create video conferencing apps not only between multiple HoloLenses, but also between a HoloLens and mobile devices.

In other words, all the tools for doing HoloLens telepresence are out there, including examples of various ways to implement it. It’s now just a matter of waiting for someone to create a great solution.

The post Building a Telepresence App with HoloLens and Kinect appeared first on Building Apps for Windows.

Windows Developers at Microsoft Build 2017

$
0
0

Microsoft Build 2017 kicks off on May 10 in Seattle, with an expected capacity crowd of over 5,000 developers—plus countless more online. Join us for the live-streamed keynotes, announcements, technical sessions and more. You’ll be among the first to hear about new developments that will help you engage your users, keep their information safe and reach them in more places. Big things have been unveiled and promoted at Microsoft Build over the years and this year’s conference won’t be any different!

There will be quite a bit of content specifically relevant to Windows developers:

  • Improvements that help you immediately engage your users with beautiful UI and natural inputs
  • Team collaboration and connectedness to streamline and improve your development experience
  • Services that make it easier to reach customers and learn what they want from your software
  • Connected screens and experiences that make your end-to-end experience stickier and more engaging
  • Mixed reality and creating deeply immersive experiences

Sign up for a Save-the-Date reminder on our Build site for Windows Developers and we’ll keep you in the loop as new details and information come in. When you sign up, you’ll also gain the ability to:

  • Save sessions for later viewing
  • Create and share content collections
  • Discuss what you’ve seen and heard with other developers
  • Upvote content you like and track trending sessions

You’ll find sign-up, sessions and content here.

The post Windows Developers at Microsoft Build 2017 appeared first on Building Apps for Windows.

Just released – Windows developer evaluation virtual machines – April 2017 build

$
0
0

We’re releasing the April 2017 edition of our evaluation Windows developer virtual machines (VM) on Windows Dev Center. The VMs come in Hyper-V, Parallels, VirtualBox and VMWare flavors. The evaluation version will expire on 07/07/17.

Evaluation VM contain:

If you want a non-evaluation version of the VM, we have those as well. They do require a Windows 10 Pro license, which you can get from the Microsoft Store.

If you have feedback on the VMs, please provide it over at the Windows Developer Feedback UserVoice site.

The post Just released – Windows developer evaluation virtual machines – April 2017 build appeared first on Building Apps for Windows.


Windows Developer Awards: Honoring Windows Devs at Microsoft Build 2017

$
0
0

As we ramp up for Build, the Windows Dev team would like to thank you, the developer community, for all the amazing work you have done over the past 12 months. Because of your efforts and feedback, we’ve managed to add countless new features to the Universal Windows Platform and the Windows Store in an ongoing effort to constantly improve. And thanks to your input on the Windows Developer Platform Backlog, you have helped us to prioritize new UWP features.

In recognition of all you have done, this year’s Build conference in Seattle will feature the first-ever Windows Developers Awards given to community developers who have built exciting UWP apps in the last year and published them in the Windows Store. The awards are being given out in four main categories:

  • App Creator of the Year – This award recognizes an app leveraging the latest Windows 10 capabilities. Some developers are pioneers, the first to explore and integrate the latest features in Windows 10 releases. This award honors those who made use of features like Ink, Dial, Cortana, and other features in creative ways.
  • Game Creator of the Year – This award recognizes a game by a first-time publisher in Windows Store. Windows is the best gaming platform–and it’s easy to see why. From Xbox to PCs to mixed reality, developers are creating the next generation of gaming experiences. This award recognizes developers who went above and beyond to publish innovative, engaging and magical games to the Windows Store over the last year.
  • Reality Mixer of the Year – This award recognizes the app demonstrating a unique mixed reality experience. Windows Mixed Reality lets developers create experiences that transcend the traditional view of reality. This award celebrates those who choose to mix their own view of the world by blending digital and real-world content in creative ways.
  • Core Maker of the Year – This award recognizes a maker project powered by Windows. Some devs talk about the cool stuff they could build–others just do it. This award applauds those who go beyond the traditional software interface to integrate Windows in drones, PIs, gardens, and robots to get stuff done.

In addition to these, a Ninja Cat of the Year award will be given as special recognition. Selected by the Windows team at Microsoft, this award celebrates the developer or experience that we believe most reflects what Windows is all about, empowering people of action to do great things.

Here’s what we want from you: we need the developer community to help us by voting for the winners of these four awards on the awards site so take a look and tell us who you think has created the most compelling apps. Once you’ve voted, check back anytime to see how your favorites are doing. Voting will end on 4/27, so get your Ninja votes in quickly.

The post Windows Developer Awards: Honoring Windows Devs at Microsoft Build 2017 appeared first on Building Apps for Windows.

Master the Master-Detail Pattern

$
0
0

In the world of information consumption in applications, it’s crucial to have a clear and easy way to navigate and inspect that information. The master-detail design pattern has become one of the most popular approaches in applications today. In this post, we’ll discuss what this is, determine if it’s appropriate for your application and show how you can use it!

What is a master-detail?

The answer to this will depend on what kind of information your application is trying to show, but at a high level, the “master” is an area in the UI where you have a list of something and the “detail” is the area that shows the relevant information of a selection in the master.

You can find a great example of the master-detail pattern in the Windows 10 email app, “Mail.”  The master is the list of emails and the details is the selected email.

The master-detail pattern is easy to understand and doesn’t need a lot of explanation to the user. When the user selects something in the master, they see the information and any actions relevant to that detail item. For example, selecting an email shows the body of the email as well as the buttons for: reply, reply-all and delete.

The pattern works well for these types of application scenarios:

  • You have a list where it makes sense to show details (e.g. list of contacts, products, etc.)
  • You have a large list that has items that need to be prioritized (e.g. RSS readers)
  • You need to switch between items frequently but want to stay in the same context (e.g. email)

Let’s use the Microsoft RSS Reader UWP example app to illustrate the master-detail pattern’s features.

If you want to follow along or see the code first-hand, find the RSS Sample’s source code here on GitHub.

Master-detail modes

The master-detail pattern works well on a wide range of device types and display sizes. However, you should consider how you want to use the pattern on different display sizes.

There are two popular modes that will help with this:

  • Side-by-side
  • Stacked

The determination between which approach to take comes down to how much horizontal room your app has. Here’s a table of typical effective pixels available per “size class” (if you’re not familiar with Effect Pixels (epx) see this one minute video).

Size class small medium large
Typical screen size (diagonal) 4″ to 6″ 7″ to 12″, or TVs 13″ and larger
Typical devices Phones Phablets, tablets, TVs PCs, laptops, Surface Hubs
Common window sizes in effective pixels 320×569, 360×640, 480×854 960×540, 1024×640 1366×768, 1920×1080
Window width breakpoints in effective pixels 640px or less 641px to 1007px 1008px or greater

Side by side

There many scenarios in which your application will have plenty of horizontal space to stretch.  The recommended guidelines for this mode is when your application has 720 epx or more available; this puts us in to the “Medium” and “Large” size classes seen above.

A few of these are:

  • Devices that let you size the app window larger (PC, HoloLens, Surface Hub)
  • Windows 10 Mobile running Continuum
  • Windows 10 Mobile (landscape orientation)

In the side-by-side approach, you can have both the master view and the detail view showing simultaneously. Using our RSS example, here’s the side-by-side approach:

Stacked

If your application is running in between 320 to 719 epx, you can’t comfortably fit the master and details next to each other, so we’ll need another way to display the master and detail.

A few examples of this scenario are:

  • Any device that lets you resize the app window (e.g. PC, HoloLens)
  • Windows 10 Mobile (portrait orientation)

For this case, you can use the stacked approach. In stacked, the master view gets the full screen space, then, when a selection is made, the detail view gets the full screen space.

With this approach, we’re “stacking” the pages in a single area and navigating between them. For example, the user selects an item in the master, the app will navigate to the Details View. When they want to see another item, they’ll navigate back to the master and select another item.

The stacked approach can be implemented with page navigation within a Frame element. In the diagram below, the “page control” you see is where the navigation occurs between the master view and the detail view.

Using our RSS sample app, here are a couple screenshots of the master and detail in stacked mode. Note that the app is running on a desktop PC, but with the window sized small, you’ll see the same appearance as it were on a mobile device. What matters is not the device, but the available screen space!

The “Breaking Point”

You’ll notice that we have this point where we need to change between the two different modes, depending on the current app width. For our master-detail, we’ve decided to do this at 720 epx. This means that once the application window gets resized to above or below 720 epx, we should be switching between side-by-side or stacked mode.

The Universal Windows Platform has a great feature to help with changing modes: the AdaptiveTrigger. Using an AdaptiveTrigger in your view’s VisualStates, you can adapt the UI when the application’s window size reaches that “breaking point.”  In the RSS sample, you can see how this is done on the MasterDetailPage.xaml.

First, let’s look at the master-detail layout; there’s a Frame element for the master content (ListView of feeds and articles) and a WebView for the detail content (the selected article). Notice the default width of the MasterColumn is set to 360.


    <Grid.ColumnDefinitions>
        <ColumnDefinition x:Name="MasterColumn"
                          Width="360" />
        <ColumnDefinition x:Name="DetailColumn"
                          Width="*" />
    </Grid.ColumnDefinitions>

    <Frame x:Name="MasterFrame" />

    <WebView x:Name="ArticleWebView"
             Grid.Column="1"
             Visibility="Collapsed" />
</Grid>

Now, let’s look at line 49 in the VisualStateGroups. You’ll see the VisualState named “NarrowState.” In this visual state, the MasterColumn.Width changes to * (star, which means “take all the available space”) and the DetailColumn.Width changes to 0.

Because the AdaptiveTrigger is set to 720, anything between 0 and 719 will use the NarrowState and anything 720 or larger will use the DefaultState.


<VisualStateManager.VisualStateGroups>
    <VisualStateGroup>
        <VisualState x:Name="DefaultState">
            <VisualState.StateTriggers>
                <AdaptiveTrigger MinWindowWidth="720" />
            </VisualState.StateTriggers>
        </VisualState>
        <VisualState x:Name="NarrowState">
            <VisualState.StateTriggers>
                <AdaptiveTrigger MinWindowWidth="0" />
            </VisualState.StateTriggers>
            <VisualState.Setters>
                <Setter Target="MasterColumn.Width" Value="*" />
                <Setter Target="DetailColumn.Width" Value="0" />
            </VisualState.Setters>
        </VisualState>
    </VisualStateGroup>
</VisualStateManager.VisualStateGroups>

To see this in action, run the RSS reader example and resize the window from big to small and back. You’ll see the visual states change and switch between the side-by-side and stacked modes.

Additional Detail Functionality

In the beginning of this article, we briefly touched on how you can have context-aware functionality when using a master-detail. The example was having a “reply” button for an email app. However, you can go much further with it. Here are some more examples of functionality you can put into the detail view:

  • Product list: Order, track, add to wish list
  • Contact list detail options: Call, email, drive to
  • Inventory list detail: Reorder, mark damaged, ship

Another takeaway is that you can share the same controls (e.g. Buttons) for frequently used functionality and that functionality would intuitively be for that selected item in the detail view.

UWP Community Toolkit

If you’re building an application that could benefit from a master-detail implementation, you can skip a lot of the work by using the MasterDetailView control in the UWP Community Toolkit. With as little as a few lines of code and a couple DataTemplates (one for the master’s items and the one for the detail view), you can be up and running quickly.

Here’s the example from the UWP Community Toolkit demo app:


<controls:MasterDetailsView
          ItemsSource="{Binding Items}"
          ItemTemplate="{StaticResource ListTemplate}"
          DetailsTemplate="{StaticResource DetailsTemplate}">
</controls:MasterDetailsView>

Resources

The post Master the Master-Detail Pattern appeared first on Building Apps for Windows.

Make App Promotions Work: Acquire & Re-engage the Right Set of Users

$
0
0

Click! Click! Click! and you are done. Yes, acquiring new users and re-engaging with existing users of your app is as simple as that in the tried and tested ‘promote your app’ feature in the Windows Dev Center. If you are not familiar with these capabilities, learn more about them here.

This blog is about making promotions work for you so that the ad campaigns that you create can acquire the right set of users at the lowest cost.

DO’s

Do choose auto-targeting unless you are 100% sure of your game/app audience profile.

  • Choosing manual targeting without knowing the right audience profile may end up giving bad ROI for the campaign.
  • For e.g. most card/casino based games work well with age group 50+ while racing games work with 18+ male.
  • Let our machine learning algorithms do the work for you.

Do use a good descriptive tagline in the ad creative.

  • Most users often forget to the fill the custom tagline or write a tagline that is very generic.
  • Creatives with taglines have higher click through rates compared to those that don’t.
  • Highlighting the differentiating/unique features of the app also increases the click through rates.

Do leverage the power of free campaigns.

  • Create house campaigns that run all the time without fail if you have multiple ad monetized apps.
  • Opt-in to community program to earn credits for displaying other developers’ app install ads. You can use those credits to run free app promotions.
  • Create community campaigns to get featured in apps owned by other developers who have opted in to the program for spending your credits.

DON’T’s

Don’t choose extremely low budgets.

  • We have seen a few developers create monthly campaigns with budgets as low as $50.
  • Campaigns with monthly budgets lower than $100 would not make a sufficient dent in the bottom-line of the business, given they help in acquiring anywhere between 70 to 100 new users.
  • For running a sustainable business, calculate the required average number of monthly active users, and then choose a budget that would help acquire a percentage of those users.

Don’t target a generic segment in re-engagement campaigns.

  • Re-engagement campaigns help you target specific segments of users with a precise objective.
  • Creating a generic segment will lead to a bad ROI with no objective met at the end of the campaign period.
  • For example, if you target all the users who have used the app in the last week, the campaign will not have any results unless there is a new feature in the app and the highlight is captured in the ad creative.

Don’t forget to monitor the campaigns regularly.

  • Ad campaign ROI can change based on the marketplace dynamics.
  • Machine learning algorithms help optimize for the best ROI in the backend, but campaign delivery might take a hit due to extremely low budget or manual targeting of a niche segment of users who are not available in the apps with ads.
  • Tweak the campaigns in the initial few days/weeks to end up with the best combination of creatives/budget/target audience to get the best ROI.

Stay tuned for additional tips to increase ad monetization over the next few weeks.

The post Make App Promotions Work: Acquire & Re-engage the Right Set of Users appeared first on Building Apps for Windows.

COM Server and OLE Document support for the Desktop Bridge

$
0
0

The Windows 10 Creators Update adds out-of-process (OOP) COM and OLE support for apps on the Desktop Bridge – a.k.a Packaged COM. Historically, Win32 apps would create COM extensions that other applications could use. For example, Microsoft Excel exposes its Excel.Application object so third-party applications can automate operations in Excel, leveraging its rich object model. But in the initial release of the Desktop Bridge with the Windows 10 Anniversary Update, an application cannot expose its COM extension points, as all registry entries are in its private hive and not exposed publicly to the system. Packaged COM provides a mechanism for COM and OLE entries to be declared in the manifest so they can be used by external applications. The underlying system handles the activation of the objects so they can be consumed by COM clients – all while still delivering on the Universal Windows Platform (UWP) promise of having a no-impact install and uninstall behavior.

How it works

Packaged COM entries are read from the manifest and stored in a new catalog that the UWP deployment system manages. This solves one of the main problems in COM in which any application or installer can write to the registry and corrupt the system, e.g. overwriting existing COM registrations or leaving behind registry entries upon uninstall.

At run-time when a COM call is made, i.e. calling CLSIDFromProgID() or CoCreateInstance(), the system first looks in the Packaged COM catalog and, if not found, falls back to the system registry. The COM server is then activated and runs OOP from the client application.

When to use Packaged COM

Packaged COM is very useful for apps that expose third-party extension points, but not all applications need it. If your application uses COM only for its own personal use, then you can rely on COM entries in the application’s private hive (Registry.dat) to support your app. All binaries in the same package have access to that registry, but any other apps on the system cannot see into your app’s private hive. Packaged COM allows you explicit control over which servers can be made public and used by third-parties.

Limitations

As the Packaged COM entries are stored in a separate catalog, applications that directly read the registry (e.g. calling RegOpenKeyEx() or RegEnumKeyEx()) will not see any entries and will fail. In these scenarios, applications providing extensions will need to work with their partners to go through COM API calls or provide another app-to-app communication mechanism.

Support is scoped to OOP servers, allowing two key requirements. First, OOP server supports means the Desktop Bridge can maintain its promise of serviceability. By running extensions OOP, the update manager can shut down the COM server and update all binaries because there are no dlls in use loaded by other processes. Second, OOP allows for a more robust extension mechanism. If an in-process COM server is hung, it will also hang the app; for OOP, the host app will still function and can decide how to handle the misbehaving OOP server.

We do not support every COM and OLE registration entry, for the full list of what we support please refer to the element hierarchy in the Windows 10 app package manifest on MSDN: https://docs.microsoft.com/uwp/schemas/appxpackage/uapmanifestschema/root-elements

Taking a closer look

The keys to enabling this functionality are the new manifest extension categories “windows.comServer” and “windows.comInterface.” The “windows.comServer” extension corresponds to the typical registration entries found under the CLSID (i.e.  HKEY_CLASSES_ROOT\CLSID\{MyClsId}) for an application supporting executable servers and their COM classes (including their OLE registration entries), surrogate servers, ProgIDs and TreatAs classes. The “windows.comInterface” extension corresponds to the typical registration entries under both the HKCR \Interface\{MyInterfaceID} and HKCR\Typelib\{MyTypelibID}, and supports Interfaces, ProxyStubs and Typelibs.

If you have registered COM classes before, these elements will look very familiar and straightforward to map from the existing registry keys into manifest entries. Here are a few examples.

Example #1: Registering an .exe COM server

In this first example, we will package ACDual for the Desktop Bridge. ACDual is an MFC OLE sample that shipped in earlier versions of Visual Studio. This app is an .exe COM server, ACDual.exe, with a Document CoClass that implements the IDualAClick interface. A client can then consume it. Below is a picture of the ACDual server and a simple WinForms client app that is using it:

Fig. 1 Client WinForms app automating AutoClick COM server

Store link: https://www.microsoft.com/store/apps/9nm1gvnkhjnf

GitHub link: https://github.com/Microsoft/DesktopBridgeToUWP-Samples/tree/master/Samples/PackagedComServer

Registry versus AppxManifest.xml

To understand how Packaged COM works, it helps to compare the typical entries in the registry with the Packaged COM entries in the manifest. For a minimal COM server, you typically need a CLSID with the LocalServer32 key, and an Interface pointing to the ProxyStub to handle cross-process marshaling. ProgIDs and TypeLibs make it easier to read and program against. Let’s take a look at each section and compare what the system registry looks like in comparison to Packaged COM snippets. First, let’s look at the following ProgID and CLSID entry that registers a server in the system registry:


; ProgID registration
[HKEY_CLASSES_ROOT\ACDual.Document]
@="AClick Document"
[HKEY_CLASSES_ROOT\ACDual.Document\CLSID]
@="{4B115281-32F0-11CF-AC85-444553540000}"
[HKEY_CLASSES_ROOT\ACDual.Document\DefaultIcon]
@=”C:\\VCSamples\\MFC\\ole\\acdual\\Release\\ACDual.exe,1”

; CLSID registration
[HKEY_CLASSES_ROOT\CLSID\{4B115281-32F0-11CF-AC85-444553540000}]
@="AClick Document"
[HKEY_CLASSES_ROOT\CLSID\{4B115281-32F0-11CF-AC85-444553540000}\InprocHandler32]
@="ole32.dll"
[HKEY_CLASSES_ROOT\CLSID\{4B115281-32F0-11CF-AC85-444553540000}\LocalServer32]
@="\"C:\\VCSamples\\MFC\\ole\\acdual\\Release\\ACDual.exe\""
[HKEY_CLASSES_ROOT\CLSID\{4B115281-32F0-11CF-AC85-444553540000}\ProgID]
@="ACDual.Document"

For comparison, the translation into the package manifest is straightforward. The ProgID and CLSID are supported through the windows.comServer extension, which must be under your app’s Application element along with all of your other extensions. Regarding ProgIDs, you can have multiple ProgID registrations for your server. Notice that there is no default value of the ProgID to provide a friendly name, as that information is stored with the CLSID registration and one of the goals of the manifest schema is to reduce duplication of information. The CLSID registration is enabled through the ExeServer element with an Executable attribute, which is a relative path to the .exe contained in the package. Package-relative paths solve one common problem with registering COM servers declaratively: in a .REG file, you don’t know where your executable is located. Often in a package, all the files are placed in the root of the package. The Class registration element is within the ExeServer element. You can specify one or more classes for an ExeServer.


<Applications>
    <Application Id="ACDual" Executable="ACDual.exe" EntryPoint="Windows.FullTrustApplication">
      <uap:VisualElements DisplayName="ACDual" .../>
    <Extensions>
      <com:Extension Category="windows.comServer">
        <com:ComServer>
          <!-- CLSID -->
          <com:ExeServer Executable="ACDual.exe" DisplayName="AutoClick">
            <com:Class Id ="4B115281-32F0-11cf-AC85-444553540000" DisplayName="AClick Document" ProgId="AutoClick.Document.1" VersionIndependentProgId="AutoClick.Document">
            </com:Class>
          </com:ExeServer>
          <!-- ProgId -->
          <com:ProgId Id="AutoClick.Document" CurrentVersion="AutoClick.Document.1" />
          <com:ProgId Id="AutoClick.Document.1" Clsid="4B115281-32F0-11cf-AC85-444553540000" />
        </com:ComServer>
      </com:Extension>

The next step is TypeLib and interface registration. In this example, the TypeLib is part of the main executable, and the interface uses the standard marshaler (oleaut32.dll) for its ProxyStub, so the registration is as follows:


[HKEY_CLASSES_ROOT\Interface\{0BDD0E81-0DD7-11CF-BBA8-444553540000}]
@="IDualAClick"
[HKEY_CLASSES_ROOT\Interface\{0BDD0E81-0DD7-11CF-BBA8-444553540000}\ProxyStubClsid32]
@="{00020424-0000-0000-C000-000000000046}"
[HKEY_CLASSES_ROOT\Interface\{0BDD0E81-0DD7-11CF-BBA8-444553540000}\TypeLib]
@="{4B115284-32F0-11CF-AC85-444553540000}"
"Version"="1.0"


;TypeLib registration
[HKEY_CLASSES_ROOT\TypeLib\{4B115284-32F0-11CF-AC85-444553540000}]
[HKEY_CLASSES_ROOT\TypeLib\{4B115284-32F0-11CF-AC85-444553540000}\1.0]
@="ACDual"
[HKEY_CLASSES_ROOT\TypeLib\{4B115284-32F0-11CF-AC85-444553540000}\1.0\0]
[HKEY_CLASSES_ROOT\TypeLib\{4B115284-32F0-11CF-AC85-444553540000}\1.0\0\win32]
@=" C:\\VCSamples\\MFC\\ole\\acdual\\Release\\AutoClik.TLB"
[HKEY_CLASSES_ROOT\TypeLib\{4B115284-32F0-11CF-AC85-444553540000}\1.0\FLAGS]
@="0"
[HKEY_CLASSES_ROOT\TypeLib\{4B115284-32F0-11CF-AC85-444553540000}\1.0\HELPDIR]
@=""

In translating this into the package manifest, the windows.comInterface extension supports one or more TypeLib, ProxyStub and interface registrations. Typically, it is placed under the Application element so it is easier to associate with the class registrations for readability, but it may also reside under the Package element. Also, note that we did not have to remember the CLSID of the universal marshaler (the key where ProxyStubClsid32 = {00020424-0000-0000-C000-000000000046}). This is simply a flag: UseUniversalMarshaler=”true”.


<com:Extension Category="windows.comInterface">
        <com:ComInterface>
          <!-- Interfaces -->
          <!-- IID_IDualAClick -->
          <com:Interface Id="0BDD0E81-0DD7-11cf-BBA8-444553540000" UseUniversalMarshaler="true">
            <com:TypeLib Id="4B115284-32F0-11cf-AC85-444553540000" VersionNumber="1.0" />
          </com:Interface>

          <!-- TypeLib -->
          <com:TypeLib Id="4B115284-32F0-11cf-AC85-444553540000">
            <com:Version DisplayName = "ACDual" VersionNumber="1.0" LocaleId="0" LibraryFlag="0">
              <com:Win32Path Path="AutoClik.tlb" />
            </com:Version>
          </com:TypeLib>
        </com:ComInterface>
      </com:Extension>
    </Extensions>
    </Application>
  </Applications>

Now you can initialize and use the server from any language that supports COM and dual interface OLE automation servers.

Example #2: OLE support

In this next example, we will package an existing OLE document server to demonstrate the capabilities of the Desktop Bridge and Packaged COM. The example we will use is the MFC Scribble sample app, which provides an insertable document type called Scribb Document. Scribble is a simple server that allows an OLE container, such as WordPad, to insert a Scribb Document.

Fig 2. WordPad hosting an embedded Scribb Document

Store Link: https://www.microsoft.com/store/apps/9n4xcm905zkj

GitHub Link: https://github.com/Microsoft/DesktopBridgeToUWP-Samples/tree/master/Samples/PackagedOleDocument

Registry versus AppxManifest.xml

There are many keys to specify various OLE attributes. Again, the magic here is that the platform has been updated to work with Packaged COM, and all you have to do is translate those keys into your manifest. In this example, the entries for Scribble include the ProgID, its file type associations and the CLSID with entries.


;SCRIBBLE.REG
;
;FileType Association using older DDEExec command to launch the app
[HKEY_CLASSES_ROOT\.SCB]
@=”Scribble.Document”
[HKEY_CLASSES_ROOT\Scribble.Document\shell\open\command]
@=”SCRIBBLE.EXE %1”


;ProgId
[HKEY_CLASSES_ROOT\Scribble.Document]
@= Scribb Document
[HKEY_CLASSES_ROOT\Scribble.Document\Insertable]
@=””
[HKEY_CLASSES_ROOT\Scribble.Document\CLSID]
@= “{7559FD90-9B93-11CE-B0F0-00AA006C28B3}}”


;ClsId with OLE entries
[HKEY_CLASSES_ROOT\CLSID\{7559FD90-9B93-11CE-B0F0-00AA006C28B3}]
@="Scribb Document"
[HKEY_CLASSES_ROOT\CLSID\{7559FD90-9B93-11CE-B0F0-00AA006C28B3}\AuxUserType]
[HKEY_CLASSES_ROOT\CLSID\{7559FD90-9B93-11CE-B0F0-00AA006C28B3}\AuxUserType\2]
@="Scribb"
[HKEY_CLASSES_ROOT\CLSID\{7559FD90-9B93-11CE-B0F0-00AA006C28B3}\AuxUserType\3]
@="Scribble"
[HKEY_CLASSES_ROOT\CLSID\{7559FD90-9B93-11CE-B0F0-00AA006C28B3}\DefaultIcon]
@="\"C:\\VC2015Samples\\scribble\\Release\\Scribble.exe\",1"
[HKEY_CLASSES_ROOT\CLSID\{7559FD90-9B93-11CE-B0F0-00AA006C28B3}\InprocHandler32]
@="ole32.dll"
[HKEY_CLASSES_ROOT\CLSID\{7559FD90-9B93-11CE-B0F0-00AA006C28B3}\Insertable]
@=""
[HKEY_CLASSES_ROOT\CLSID\{7559FD90-9B93-11CE-B0F0-00AA006C28B3}\LocalServer32]
@="\"C:\\VC2015Samples\\scribble\\Release\\Scribble.exe\""
[HKEY_CLASSES_ROOT\CLSID\{7559FD90-9B93-11CE-B0F0-00AA006C28B3}\MiscStatus]
@="32"
[HKEY_CLASSES_ROOT\CLSID\{7559FD90-9B93-11CE-B0F0-00AA006C28B3}\ProgID]
@="Scribble.Document"
[HKEY_CLASSES_ROOT\CLSID\{7559FD90-9B93-11CE-B0F0-00AA006C28B3}\Verb]
[HKEY_CLASSES_ROOT\CLSID\{7559FD90-9B93-11CE-B0F0-00AA006C28B3}\Verb\0]
@="&amp;Edit,0,2"
[HKEY_CLASSES_ROOT\CLSID\{7559FD90-9B93-11CE-B0F0-00AA006C28B3}\Verb\1]
@="&amp;Open,0,2"

First, let’s discuss the file type association. This is an extension that was supported in the first release of the Desktop Bridge extensions. Note that specifying the file type association here automatically adds support for the shell open command.

Next, let’s take a closer look at the ProgID and CLSID entries. In this case, the simple example only has a ProgID and no VersionIndependentProgID.

Most of the excitement in this example is underneath the CLSID where all the OLE keys live. The registry keys typically map to attributes of the class, such as:

  • Insertable key under either the ProgID or CLSID, mapping to the InsertableObject=”true” attribute
  • If the InprocHandler32 key is Ole32.dll, use the EnableOleDefaultHandler=”true” attribute
  • AuxUserType\2, mapping to ShortDisplayName
  • AuxUserType\3, mapping to the Application DisplayName
  • In cases where there were multiple values in a key, such as the OLE verbs, we’ve split those out into separate attributes. Here’s what the full manifest looks like:

  <Applications>
    <Application Id="Scribble" Executable="Scribble.exe" EntryPoint="Windows.FullTrustApplication">
      <uap:VisualElements DisplayName="Scribble App" .../>
      <Extensions>
        <uap:Extension Category="windows.fileTypeAssociation">
          <uap3:FileTypeAssociation Name="scb" Parameters="%1">
            <uap:SupportedFileTypes>
              <uap:FileType>.scb</uap:FileType>
            </uap:SupportedFileTypes>
          </uap3:FileTypeAssociation>
        </uap:Extension>

        <com:Extension Category="windows.comServer">
          <com:ComServer>
            <com:ExeServer Executable="Scribble.exe" DisplayName="Scribble">
              <!-- ClsId Registration -->
              <com:Class Id="7559FD90-9B93-11CE-B0F0-00AA006C28B3" DisplayName="Scribb Document" ShortDisplayName="Scribb" ProgId="Scribble.Document.1" VersionIndependentProgId ="Scribble.Document" EnableOleDefaultHandler="true" InsertableObject="true">
                <com:DefaultIcon Path="Scribble.exe" ResourceIndex="1" />
                <com:MiscStatus OleMiscFlag="32"/>
                <com:Verbs>
                  <com:Verb Id="0" DisplayName="&amp;Edit" AppendMenuFlag="0" OleVerbFlag="2" />
                  <com:Verb Id="1" DisplayName="&amp;Open" AppendMenuFlag="0" OleVerbFlag="2" />
                </com:Verbs>
              </com:Class>
            </com:ExeServer>
            <!-- ProgId Registration -->
            <com:ProgId Id="Scribble.Document" CurrentVersion="Scribble.Document.1" />
            <com:ProgId Id="Scribble.Document.1" Clsid="7559FD90-9B93-11CE-B0F0-00AA006C28B3" />
          </com:ComServer>
        </com:Extension>
      </Extensions>
    </Application>
  </Applications>

Additional support

The two examples above covered the most common cases of a COM server and an OLE document support. Packaged COM also supports additional servers like Surrogates and TreatAs classes. For more information, please refer to the element hierarchy in the Windows 10 app package manifest on MSDN: https://docs.microsoft.com/uwp/schemas/appxpackage/uapmanifestschema/root-elements

Conclusion

With UWP and Windows 10, applications can take advantage of several exciting new features while leveraging existing code investments in areas such as COM. With the Desktop Bridge platform and tooling enhancements, existing PC software can now be part of the UWP ecosystem and take advantage of the same set of new platform features and operating system capabilities.

For more information on the Desktop Bridge, please visit the Windows Dev Center.

Ready to submit your app to the Windows Store? Let us know!

Update – the Desktop App Converter has been updated to support new extensions available in the Windows 10 Creators Update, including support for Packaged COM.  Please get the latest converter at http://aka.ms/converter.

The post COM Server and OLE Document support for the Desktop Bridge appeared first on Building Apps for Windows.

Monetize your app: Know the user to serve better targeted ads

$
0
0

Knowing the users of your app leads to much better monetization when serving ads. The Microsoft Advertising ID is a unique identifier for millions of Windows app users. These users are also exposed to ads on websites that they browse. By helping ad networks identify the same user across apps and web, the app developer can monetize much better through ads.

For example, ad networks can serve re-targeting ads across the two platforms and help advertisers more precisely target their audience. Linking user IDs across app and web is a simple one-step process: in your app’s workflow, at any point where the user navigates from the app to an external website.

Some suggested ways of doing this are:

  1. Open your webpage from the app once it’s installed –> invoke the default browser with your webpage –> set the destination URL in the link below.
  2. Open a useful webpage from your app – other app developers have used “leader boards” as a potential destination location for the link below.

Add the following URL as the first click through:

https://dpa-fwl.microsoft.com/redirect.html?referrerID=
<MicrosoftAdvertisingID>&src=<Your_App’s_Store_ID>&rurl=<Destination_URL

You can get the user’s Microsoft advertising ID by following the method described here. Assign your app’s Store ID to the ‘src’ parameter, and the destination URL (where you want to redirect the user to) in an encoded format under the ‘rurl’ parameter.

Here is a sample URL with all fields populated:

https://dpa-fwl.microsoft.com/redirect.html?referrerID=c4d4a9d5413
b4275059733abe0857827&src=9wzdncrfhv61&rurl=http%3A%2F%2Fwww.bing.com

When this URL is called, ad networks get the user’s Microsoft Advertising ID and can link it to other IDs for the same user maintained on their end through a server side sync process.

Stay tuned over the next few weeks for additional tips to increase ad monetization.

The post Monetize your app: Know the user to serve better targeted ads appeared first on Building Apps for Windows.

Viewing all 623 articles
Browse latest View live