diff options
Diffstat (limited to 'MediaBrowser.UI.Controls/ExtendedScrollViewer.cs')
| -rw-r--r-- | MediaBrowser.UI.Controls/ExtendedScrollViewer.cs | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/MediaBrowser.UI.Controls/ExtendedScrollViewer.cs b/MediaBrowser.UI.Controls/ExtendedScrollViewer.cs deleted file mode 100644 index c1a6f1c47..000000000 --- a/MediaBrowser.UI.Controls/ExtendedScrollViewer.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System.Windows.Controls; -using System.Windows.Input; - -namespace MediaBrowser.UI.Controls -{ - /// <summary> - /// This subclass solves the problem of ScrollViewers eating KeyDown for all arrow keys - /// </summary> - public class ExtendedScrollViewer : ScrollViewer - { - protected override void OnKeyDown(KeyEventArgs e) - { - if (e.Handled || e.OriginalSource == this) - { - base.OnKeyDown(e); - return; - } - - // Don't eat left/right if horizontal scrolling is disabled - if (e.Key == Key.Left || e.Key == Key.Right) - { - if (HorizontalScrollBarVisibility == ScrollBarVisibility.Disabled) - { - return; - } - } - - // Don't eat up/down if vertical scrolling is disabled - if (e.Key == Key.Up || e.Key == Key.Down) - { - if (VerticalScrollBarVisibility == ScrollBarVisibility.Disabled) - { - return; - } - } - - // Let the base class do it's thing - base.OnKeyDown(e); - } - } -} |
