From 17c1fd576057bdd2d6aea517d733fe8af6e6b2ba Mon Sep 17 00:00:00 2001 From: LukePulverenti Date: Sat, 23 Feb 2013 10:58:08 -0500 Subject: moved ui to it's own repo --- MediaBrowser.UI.Controls/ExtendedScrollViewer.cs | 41 ------------------------ 1 file changed, 41 deletions(-) delete mode 100644 MediaBrowser.UI.Controls/ExtendedScrollViewer.cs (limited to 'MediaBrowser.UI.Controls/ExtendedScrollViewer.cs') 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 -{ - /// - /// This subclass solves the problem of ScrollViewers eating KeyDown for all arrow keys - /// - 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); - } - } -} -- cgit v1.2.3