/// <summary>
        /// Query DeviceInformation class for Midi Input devices
        /// </summary>
        private async Task EnumerateMidiInputDevices()
        {
            // Clear input devices
            InputDevices.Clear();
            InputDeviceProperties.Clear();
            inputDeviceProperties.IsEnabled = false;

            // Find all input MIDI devices
            string midiInputQueryString = MidiInPort.GetDeviceSelector();
            DeviceInformationCollection midiInputDevices = await DeviceInformation.FindAllAsync(midiInputQueryString);

            // Return if no external devices are connected
            if (midiInputDevices.Count == 0)
            {
                InputDevices.Add("No MIDI input devices found!");
                inputDevices.IsEnabled = false;

                NotifyUser("Please connect at least one external MIDI device for this demo to work correctly");
                return;
            }

            // Else, add each connected input device to the list
            foreach (DeviceInformation deviceInfo in midiInputDevices)
            {
                InputDevices.Add(deviceInfo.Name);
                inputDevices.IsEnabled = true;
            }

            NotifyUser("MIDI Input devices found!");
        }
        /// <summary>
        /// Change the active input MIDI device
        /// </summary>
        /// <param name="sender">Element that fired the event</param>
        /// <param name="e">Event arguments</param>
        private void inputDevices_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            // Get the selected input MIDI device
            int selectedInputDeviceIndex = inputDevices.SelectedIndex;

            // Try to display the appropriate device properties
            if (selectedInputDeviceIndex < 0)
            {
                // Clear input device properties
                InputDeviceProperties.Clear();
                InputDeviceProperties.Add("Select a MIDI input device to view its properties");
                inputDeviceProperties.IsEnabled = false;
                NotifyUser("Select a MIDI input device to view its properties");
                return;
            }

            DeviceInformationCollection devInfoCollection = _midiInDeviceWatcher.GetDeviceInformationCollection();

            if (devInfoCollection == null)
            {
                InputDeviceProperties.Clear();
                InputDeviceProperties.Add("Device not found!");
                inputDeviceProperties.IsEnabled = false;
                NotifyUser("Device not found!");
                return;
            }

            DeviceInformation devInfo = devInfoCollection[selectedInputDeviceIndex];

            if (devInfo == null)
            {
                InputDeviceProperties.Clear();
                InputDeviceProperties.Add("Device not found!");
                inputDeviceProperties.IsEnabled = false;
                NotifyUser("Device not found!");
                return;
            }

            // Display the found properties
            DisplayDeviceProperties(devInfo, inputDeviceProperties, InputDeviceProperties);
            NotifyUser("Device information found!");
        }
        /// <summary>
        /// Clear all input and output MIDI device lists and properties
        /// </summary>
        private void ClearAllDeviceValues()
        {
            // Clear input devices
            InputDevices.Clear();
            InputDevices.Add("Click button to list input MIDI devices");
            inputDevices.IsEnabled = false;

            // Clear output devices
            OutputDevices.Clear();
            OutputDevices.Add("Click button to list output MIDI devices");
            outputDevices.IsEnabled = false;

            // Clear input device properties
            InputDeviceProperties.Clear();
            InputDeviceProperties.Add("Select a MIDI input device to view its properties");
            inputDeviceProperties.IsEnabled = false;

            // Clear output device properties
            OutputDeviceProperties.Clear();
            OutputDeviceProperties.Add("Select a MIDI output device to view its properties");
            outputDeviceProperties.IsEnabled = false;
        }