Note that there are some explanatory texts on larger screens.

plurals
  1. POc# InvalidEnumArgumentException: The value of argument 'direction' (3) is invalid for Enum type 'FocusNavigationDirection'
    text
    copied!<p>I have a WPF-C# application with a ribbon menu and several text box into the main panel. when i focus one of them and press the left arrow, i get the following error. when i press on any other arrow it works well. i tried to breakpoint on a previewKeyDoyn of a specific textbox method but the Exception is thrown before i can ran into it.</p> <p>All other textbox in my application work well when i press the left arrow.</p> <pre><code>System.ComponentModel.InvalidEnumArgumentException: La valeur de l'argument 'direction' (3) n'est pas valide pour le type Enum 'FocusNavigationDirection'. Nom du paramètre : direction à System.Windows.Input.KeyboardNavigation.IsInDirection(Rect fromRect, Rect toRect, FocusNavigationDirection direction) à System.Windows.Input.KeyboardNavigation.FindNextInDirection(DependencyObject sourceElement, Rect sourceRect, DependencyObject container, FocusNavigationDirection direction, Double startRange, Double endRange) à System.Windows.Input.KeyboardNavigation.MoveNext(DependencyObject sourceElement, DependencyObject container, FocusNavigationDirection direction, Double startRange, Double endRange) à System.Windows.Input.KeyboardNavigation.GetNextInDirection(DependencyObject sourceElement, FocusNavigationDirection direction) à System.Windows.Input.KeyboardNavigation.PredictFocusedElement(DependencyObject sourceElement, FocusNavigationDirection direction) à System.Windows.FrameworkElement.PredictFocus(FocusNavigationDirection direction) à Microsoft.Windows.Controls.Ribbon.RibbonHelper.PredictFocus(DependencyObject element, FocusNavigationDirection direction) dans e:\dd\WPFOOB\src\wpfoob\Ribbon\RibbonControlsLibrary\Microsoft\Windows\Controls\Ribbon\RibbonHelper.cs:ligne 488 à Microsoft.Windows.Controls.Ribbon.RibbonApplicationMenu.OnPreviewKeyDown(KeyEventArgs e) dans e:\dd\WPFOOB\src\wpfoob\Ribbon\RibbonControlsLibrary\Microsoft\Windows\Controls\Ribbon\RibbonApplicationMenu.cs:ligne 520 à System.Windows.UIElement.OnPreviewKeyDownThunk(Object sender, KeyEventArgs e) à System.Windows.Input.KeyEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget) à System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) à System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) à System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) à System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args) à System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args) à System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted) à System.Windows.Input.InputManager.ProcessStagingArea() à System.Windows.Input.InputManager.ProcessInput(InputEventArgs input) à System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport) à System.Windows.Interop.HwndKeyboardInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawKeyboardActions actions, Int32 scanCode, Boolean isExtendedKey, Boolean isSystemKey, Int32 virtualKey) à System.Windows.Interop.HwndKeyboardInputProvider.ProcessKeyAction(MSG&amp; msg, Boolean&amp; handled) à System.Windows.Interop.HwndSource.CriticalTranslateAccelerator(MSG&amp; msg, ModifierKeys modifiers) à System.Windows.Interop.HwndSource.OnPreprocessMessage(Object param) à System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) à MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler) </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload