Beispiel #1
0
        private void ModernWindow_Loaded(object sender, RoutedEventArgs e)
        {
            var windowHandle = new WindowInteropHelper(this).Handle;

            var notificationHandle = IntPtr.Zero;

            DeviceModel.RegisterForDeviceNotifications(windowHandle, ref notificationHandle);
        }
 public void RegisterForDeviceNotifications(IntPtr handle, ref IntPtr notificationHandle)
 {
     DeviceModel.RegisterForDeviceNotifications(handle, ref notificationHandle);
 }