private void CmdApply_Click(object sender, RoutedEventArgs e)
 {
     _tempSettings.ScaleFactor  = ScaleFactorUI;
     _tempSettings.MinNeighbors = MinNeighborsUI;
     _tempSettings.MinSize      = MinSizeUI;
     _tempSettings.MaxSize      = MaxSizeUI;
     Settings = _tempSettings;
     CollapseSettings();
     OnNewSettingsVerified?.Invoke(this, (SettingsReturnResult.Apply, Settings));
 }
        private void CmdCancel_Click(object sender, RoutedEventArgs e)
        {
            ScaleFactorUI  = Settings.ScaleFactor;
            MinNeighborsUI = Settings.MinNeighbors;
            MinSizeUI      = Settings.MinSize;
            MaxSizeUI      = Settings.MaxSize;

            switch (Settings.CascadeType)
            {
            case SettingsControlProperties.Cascade.None:
                break;

            case SettingsControlProperties.Cascade.Default:
                HighlightDefaultCascade();
                break;

            case SettingsControlProperties.Cascade.Alt1:
                HighlightAlt1Cascade();
                break;

            case SettingsControlProperties.Cascade.Alt2:
                HighlightAlt2Cascade();
                break;

            default:
                break;
            }

            switch (Settings.SourceType)
            {
            case SettingsControlProperties.Source.None:
                break;

            case SettingsControlProperties.Source.Capture:
                HighlightCapture();
                break;

            case SettingsControlProperties.Source.Browse:
                HighlightBrowse();
                break;

            default:
                break;
            }

            CollapseSettings();

            OnNewSettingsVerified?.Invoke(this, (SettingsReturnResult.Cancel, Settings));
        }