Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / wpf / src / Base / System / Windows / Input / TraversalRequest.cs / 1 / TraversalRequest.cs
using System;
namespace System.Windows.Input
{
///
/// Represents a request to an element to move focus to another control.
///
[Serializable()]
public class TraversalRequest
{
///
/// Constructor that requests passing FocusNavigationDirection
///
/// Type of focus traversal to perform
public TraversalRequest(FocusNavigationDirection focusNavigationDirection)
{
if (focusNavigationDirection != FocusNavigationDirection.Next &&
focusNavigationDirection != FocusNavigationDirection.Previous &&
focusNavigationDirection != FocusNavigationDirection.First &&
focusNavigationDirection != FocusNavigationDirection.Last &&
focusNavigationDirection != FocusNavigationDirection.Left &&
focusNavigationDirection != FocusNavigationDirection.Right &&
focusNavigationDirection != FocusNavigationDirection.Up &&
focusNavigationDirection != FocusNavigationDirection.Down)
{
throw new System.ComponentModel.InvalidEnumArgumentException("focusNavigationDirection", (int)focusNavigationDirection, typeof(FocusNavigationDirection));
}
_focusNavigationDirection = focusNavigationDirection;
}
///
/// true if reached the end of child elements that should have focus
///
public bool Wrapped
{
get{return _wrapped;}
set{_wrapped = value;}
}
///
/// Determine how to move the focus
///
public FocusNavigationDirection FocusNavigationDirection { get { return _focusNavigationDirection; } }
private bool _wrapped;
private FocusNavigationDirection _focusNavigationDirection;
}
///
/// Determine how to move the focus
///
public enum FocusNavigationDirection
{
///
/// Move the focus to the next Control in Tab order.
///
Next,
///
/// Move the focus to the previous Control in Tab order. Shift+Tab
///
Previous,
///
/// Move the focus to the first Control in Tab order inside the subtree.
///
First,
///
/// Move the focus to the last Control in Tab order inside the subtree.
///
Last,
///
/// Move the focus to the left.
///
Left,
///
/// Move the focus to the right.
///
Right,
///
/// Move the focus to the up.
///
Up,
///
/// Move the focus to the down.
///
Down,
// If you add a new value you should also add a validation check to TraversalRequest constructor
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
using System;
namespace System.Windows.Input
{
///
/// Represents a request to an element to move focus to another control.
///
[Serializable()]
public class TraversalRequest
{
///
/// Constructor that requests passing FocusNavigationDirection
///
/// Type of focus traversal to perform
public TraversalRequest(FocusNavigationDirection focusNavigationDirection)
{
if (focusNavigationDirection != FocusNavigationDirection.Next &&
focusNavigationDirection != FocusNavigationDirection.Previous &&
focusNavigationDirection != FocusNavigationDirection.First &&
focusNavigationDirection != FocusNavigationDirection.Last &&
focusNavigationDirection != FocusNavigationDirection.Left &&
focusNavigationDirection != FocusNavigationDirection.Right &&
focusNavigationDirection != FocusNavigationDirection.Up &&
focusNavigationDirection != FocusNavigationDirection.Down)
{
throw new System.ComponentModel.InvalidEnumArgumentException("focusNavigationDirection", (int)focusNavigationDirection, typeof(FocusNavigationDirection));
}
_focusNavigationDirection = focusNavigationDirection;
}
///
/// true if reached the end of child elements that should have focus
///
public bool Wrapped
{
get{return _wrapped;}
set{_wrapped = value;}
}
///
/// Determine how to move the focus
///
public FocusNavigationDirection FocusNavigationDirection { get { return _focusNavigationDirection; } }
private bool _wrapped;
private FocusNavigationDirection _focusNavigationDirection;
}
///
/// Determine how to move the focus
///
public enum FocusNavigationDirection
{
///
/// Move the focus to the next Control in Tab order.
///
Next,
///
/// Move the focus to the previous Control in Tab order. Shift+Tab
///
Previous,
///
/// Move the focus to the first Control in Tab order inside the subtree.
///
First,
///
/// Move the focus to the last Control in Tab order inside the subtree.
///
Last,
///
/// Move the focus to the left.
///
Left,
///
/// Move the focus to the right.
///
Right,
///
/// Move the focus to the up.
///
Up,
///
/// Move the focus to the down.
///
Down,
// If you add a new value you should also add a validation check to TraversalRequest constructor
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- CheckBoxRenderer.cs
- AutomationIdentifier.cs
- FileDetails.cs
- ErrorRuntimeConfig.cs
- Serializer.cs
- PathFigureCollection.cs
- VisualBrush.cs
- JsonMessageEncoderFactory.cs
- SynchronizedInputPattern.cs
- WebPartDisplayMode.cs
- DbConnectionFactory.cs
- MenuItemCollection.cs
- CategoryAttribute.cs
- AxHost.cs
- XPathDocumentNavigator.cs
- DesignRelationCollection.cs
- WindowsListBox.cs
- CodeTypeReferenceCollection.cs
- BookmarkNameHelper.cs
- DependencyObjectPropertyDescriptor.cs
- CanExecuteRoutedEventArgs.cs
- InvokeSchedule.cs
- DataGridViewTopLeftHeaderCell.cs
- _SSPISessionCache.cs
- XmlImplementation.cs
- WeakReferenceEnumerator.cs
- XmlSchemaResource.cs
- HtmlPageAdapter.cs
- Buffer.cs
- KnownColorTable.cs
- CodeSnippetTypeMember.cs
- indexingfiltermarshaler.cs
- UnknownWrapper.cs
- ExtensibleClassFactory.cs
- WebPartEditorOkVerb.cs
- UInt32.cs
- SHA1CryptoServiceProvider.cs
- ConfigurationPropertyAttribute.cs
- SymbolEqualComparer.cs
- HtmlMeta.cs
- DataListItemEventArgs.cs
- DataGridViewRowHeightInfoPushedEventArgs.cs
- XmlSerializer.cs
- EdmItemCollection.cs
- MeasureItemEvent.cs
- XmlBinaryWriter.cs
- RewritingProcessor.cs
- Single.cs
- InfoCardAsymmetricCrypto.cs
- StrokeIntersection.cs
- TypedAsyncResult.cs
- LinqDataSourceDisposeEventArgs.cs
- UncommonField.cs
- ConfigLoader.cs
- Tile.cs
- SynchronizedInputPattern.cs
- Event.cs
- TabControl.cs
- DataMember.cs
- KeyInterop.cs
- Vector3DAnimationUsingKeyFrames.cs
- SizeChangedEventArgs.cs
- CodeChecksumPragma.cs
- XsltLoader.cs
- ApplicationServicesHostFactory.cs
- XmlChildNodes.cs
- CaseInsensitiveComparer.cs
- Types.cs
- PerspectiveCamera.cs
- DataGridViewAutoSizeModeEventArgs.cs
- InstanceDataCollectionCollection.cs
- XmlReflectionImporter.cs
- DbCommandDefinition.cs
- ServerIdentity.cs
- ContractBase.cs
- TriggerCollection.cs
- ElementHostAutomationPeer.cs
- HttpApplicationFactory.cs
- EntityDataSource.cs
- SharedPerformanceCounter.cs
- AuthenticationService.cs
- ReferentialConstraint.cs
- FutureFactory.cs
- DelegatingTypeDescriptionProvider.cs
- UnsafeNativeMethodsMilCoreApi.cs
- ElementNotEnabledException.cs
- ElementAction.cs
- SecurityPolicySection.cs
- ParameterCollection.cs
- SByteConverter.cs
- HttpProtocolReflector.cs
- DataListItem.cs
- Latin1Encoding.cs
- Pen.cs
- PasswordBoxAutomationPeer.cs
- Codec.cs
- NavigatorInvalidBodyAccessException.cs
- TableCell.cs
- DocumentOrderComparer.cs
- HttpAsyncResult.cs