aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.UI.Controls/ExtendedScrollViewer.cs
diff options
context:
space:
mode:
authorLukePulverenti <luke.pulverenti@gmail.com>2013-02-23 10:58:08 -0500
committerLukePulverenti <luke.pulverenti@gmail.com>2013-02-23 10:58:08 -0500
commit17c1fd576057bdd2d6aea517d733fe8af6e6b2ba (patch)
tree660f47e816a8599aabdb7ee47f3cde64c72c3f4d /MediaBrowser.UI.Controls/ExtendedScrollViewer.cs
parent33ed929b526acbda696f00f5966917ebd6a9ded2 (diff)
moved ui to it's own repo
Diffstat (limited to 'MediaBrowser.UI.Controls/ExtendedScrollViewer.cs')
-rw-r--r--MediaBrowser.UI.Controls/ExtendedScrollViewer.cs41
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);
- }
- }
-}