- gridstep2.zip
- GOAOpen
- Extensions
- Grid
- GoaControls
- HandyContentControl
- HandyDataPresenter
- HandyDropDown
- HandyList
- HandyList
- HandyLocatedBorder
- HandyScroller
- HandySizers
- GoaOpen.csproj
- LICENSE.txt
- Properties
- ReadMe.txt
- ResourceHelper.cs
- SLControls
- Data
- DataGrid
- Extended
- Calendar
- DatePicker
- GridSplitter
- TabControl
- Standard
- Button
- CheckBox
- HandySlider
- HandyStyler
- HyperlinkButton
- ListBox
- ProgressBar
- RadioButton
- TextBox
- ToggleButton
- ToolTip
- themes
- ReadMe.txt
- Tutorials
- GridBody
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System.Windows.Input;
using Netika.Windows.Controls;
using System.Windows;
namespace Open.Windows.Controls
{
public class RowSpatialNavigator : SpatialNavigator
{
public override void ActiveKeyDown(IKeyNavigatorContainer container, GKeyEventArgs e)
{
if (((e.Key != Key.Home) && (e.Key != Key.End)) ||
((Keyboard.Modifiers & ModifierKeys.Control) != ModifierKeys.Control))
{
switch (e.Key)
{
case Key.Down:
case Key.Up:
case Key.PageDown:
case Key.PageUp:
case Key.Enter:
case Key.Home:
case Key.End:
case Key.Right:
case Key.Left:
case Key.Tab:
if (ValidateCell(container))
base.ActiveKeyDown(container, e);
else
e.Handled = true;
break;
default:
base.ActiveKeyDown(container, e);
break;
}
}
}
public override void KeyDown(IKeyNavigatorContainer container, GKeyEventArgs e)
{
if (((e.Key != Key.Home) && (e.Key != Key.End)) ||
((Keyboard.Modifiers & ModifierKeys.Control) != ModifierKeys.Control))
{
switch (e.Key)
{
case Key.Down:
case Key.Up:
case Key.PageDown:
case Key.PageUp:
case Key.Enter:
case Key.Home:
case Key.End:
case Key.Right:
case Key.Left:
case Key.Tab:
if (ValidateCell(container))
base.KeyDown(container, e);
else
e.Handled = true;
break;
default:
base.KeyDown(container, e);
break;
}
}
}
protected static bool ValidateCell(IKeyNavigatorContainer container)
{
HandyContainer parentContainer = HandyContainer.GetParentContainer((FrameworkElement)container);
return parentContainer.CommitEdit(true);
}
protected override Model GetNakedClone()
{
return new RowSpatialNavigator();
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.