private void ToggleSwitch_Toggled(object sender, RoutedEventArgs e)
        {
            ToggleSwitch toggleSwitch = sender as ToggleSwitch;

            if (toggleSwitch != null && SimulatorDropdown != null)
            {
                if (toggleSwitch.IsOn == true)
                {
                    // Show simulation options
                    SimulatorDropdown.Visibility = Visibility.Visible;

                    // Simulate capabilities
                    _activeCapabilityWrapper = (CapabilityWrapper)SimulatorDropdown.SelectedItem;
                }
                else
                {
                    // Hide simulation options
                    SimulatorDropdown.Visibility = Visibility.Collapsed;

                    // Update to use actual capabilities
                    _activeCapabilityWrapper = new CapabilityWrapper("", _liveCapabilities.AreEffectsSupported(), _liveCapabilities.AreEffectsFast());
                }

                UpdateAlbumArt();
            }
        }
        /// <summary>
        /// Handles hardware capabilities changed updates
        /// </summary>
        private void HandleCapabilitiesChanged(CompositionCapabilities sender, object args)
        {
            _liveCapabilities = sender;

            if (ToggleSwitch.IsOn == false)
            {
                // If not in simulate mode, update to wrapper to use live capabilities and update view
                _activeCapabilityWrapper = new CapabilityWrapper("", _liveCapabilities.AreEffectsSupported(), _liveCapabilities.AreEffectsFast());
                UpdateAlbumArt();
            }
        }
        private void SimulatorDropdown_SelectionChanged(object sender, Windows.UI.Xaml.Controls.SelectionChangedEventArgs e)
        {
            var selectedSimulatedCapability = (CapabilityWrapper)SimulatorDropdown.SelectedItem;

            _activeCapabilityWrapper = selectedSimulatedCapability;

            if (_backgroundImageVisual != null)
            {
                UpdateAlbumArt();
            }
        }
        public CompCapabilities()
        {
            this.InitializeComponent();

            _compositor = ElementCompositionPreview.GetElementVisual(this).Compositor;

            // Get hardware capabilities and register changed event listener
            _liveCapabilities = CompositionCapabilities.GetForCurrentView();

            var fastEffectsCapabilitySimulatedOption = new CapabilityWrapper("EffectsFast", true, true);

            capabilityDropdownOptions.Add(fastEffectsCapabilitySimulatedOption);
            capabilityDropdownOptions.Add(new CapabilityWrapper("EffectsSupported", true, false));
            capabilityDropdownOptions.Add(new CapabilityWrapper("None", false, false));
            SimulatorDropdown.SelectedItem = fastEffectsCapabilitySimulatedOption;

            _activeCapabilityWrapper = fastEffectsCapabilitySimulatedOption;
        }