Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Base / System / Windows / Input / TraversalRequest.cs / 1305600 / 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
- DBSchemaRow.cs
- MobileContainerDesigner.cs
- WebBrowserProgressChangedEventHandler.cs
- RtfToXamlReader.cs
- TimelineClockCollection.cs
- CodeCatchClause.cs
- UiaCoreTypesApi.cs
- CheckableControlBaseAdapter.cs
- WizardPanel.cs
- RawStylusSystemGestureInputReport.cs
- DocumentStatusResources.cs
- QuaternionAnimationBase.cs
- FontUnit.cs
- SizeAnimationUsingKeyFrames.cs
- KeyFrames.cs
- GridEntry.cs
- SoundPlayerAction.cs
- CodeSnippetStatement.cs
- ProfileBuildProvider.cs
- Single.cs
- IndexedSelectQueryOperator.cs
- CustomErrorCollection.cs
- DataBinder.cs
- ObjectDataProvider.cs
- FileInfo.cs
- RequestStatusBarUpdateEventArgs.cs
- StaticFileHandler.cs
- MessageBox.cs
- SHA1CryptoServiceProvider.cs
- Accessible.cs
- Evaluator.cs
- FileLogRecordHeader.cs
- QilInvokeLateBound.cs
- XmlNavigatorStack.cs
- HuffCodec.cs
- Win32Native.cs
- Component.cs
- XD.cs
- EventListener.cs
- ListParagraph.cs
- _Win32.cs
- ClientWindowsAuthenticationMembershipProvider.cs
- EasingKeyFrames.cs
- Vector3DConverter.cs
- XmlCountingReader.cs
- ErrorTableItemStyle.cs
- ProtocolsConfiguration.cs
- DocumentReferenceCollection.cs
- X509SecurityToken.cs
- XsdCachingReader.cs
- ReaderWriterLockSlim.cs
- HtmlGenericControl.cs
- DirectoryGroupQuery.cs
- JoinElimination.cs
- Math.cs
- SafeArrayTypeMismatchException.cs
- AsymmetricKeyExchangeDeformatter.cs
- Point3D.cs
- TextRunCacheImp.cs
- CompilerScope.Storage.cs
- MemoryMappedViewAccessor.cs
- BamlRecords.cs
- MessageProtectionOrder.cs
- ScriptReferenceEventArgs.cs
- SQLInt32.cs
- XamlVector3DCollectionSerializer.cs
- TextFormattingConverter.cs
- SecurityCriticalDataForSet.cs
- HtmlElement.cs
- SelectionUIService.cs
- TypographyProperties.cs
- PtsHost.cs
- PropertyBuilder.cs
- DataColumnMappingCollection.cs
- StyleBamlTreeBuilder.cs
- ControlBindingsCollection.cs
- SqlUtils.cs
- ClientSettings.cs
- TraceSection.cs
- ServiceThrottle.cs
- StringStorage.cs
- MetafileHeaderWmf.cs
- MultiView.cs
- MaskedTextProvider.cs
- TypeConverterMarkupExtension.cs
- TcpSocketManager.cs
- InheritedPropertyDescriptor.cs
- SystemInfo.cs
- cookiecollection.cs
- SequenceDesigner.cs
- ParameterModifier.cs
- CodeStatementCollection.cs
- HwndAppCommandInputProvider.cs
- ButtonBase.cs
- OleDbEnumerator.cs
- ConstrainedDataObject.cs
- WebRequest.cs
- DocobjHost.cs
- DelegateHelpers.Generated.cs
- XmlSchemaParticle.cs