Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- ServicesExceptionNotHandledEventArgs.cs
- CharUnicodeInfo.cs
- RequestCacheValidator.cs
- ConsoleTraceListener.cs
- AutomationPatternInfo.cs
- Control.cs
- UseLicense.cs
- ZipIOCentralDirectoryFileHeader.cs
- XamlDebuggerXmlReader.cs
- CodeSnippetExpression.cs
- Crc32Helper.cs
- EntityDataSourceQueryBuilder.cs
- FormConverter.cs
- SerializationHelper.cs
- BitmapScalingModeValidation.cs
- ColorMatrix.cs
- FixedSOMPage.cs
- OleDbPropertySetGuid.cs
- ArraySortHelper.cs
- EventWaitHandleSecurity.cs
- EncryptedPackageFilter.cs
- METAHEADER.cs
- SystemDiagnosticsSection.cs
- SoapDocumentServiceAttribute.cs
- ImageListUtils.cs
- GridToolTip.cs
- DataSourceXmlClassAttribute.cs
- LightweightCodeGenerator.cs
- Point4DValueSerializer.cs
- SQLDecimal.cs
- WindowsTab.cs
- XPathQueryGenerator.cs
- DataServiceRequestOfT.cs
- OdbcConnectionPoolProviderInfo.cs
- ComponentRenameEvent.cs
- StrongName.cs
- ChangePassword.cs
- DependentList.cs
- SiteIdentityPermission.cs
- ClearTypeHintValidation.cs
- TraceUtils.cs
- ControlUtil.cs
- TableRowCollection.cs
- ExtensionSimplifierMarkupObject.cs
- ResourcesBuildProvider.cs
- BehaviorEditorPart.cs
- StrokeCollection.cs
- AutomationFocusChangedEventArgs.cs
- TextTreeDeleteContentUndoUnit.cs
- HtmlInputReset.cs
- Trigger.cs
- SspiHelper.cs
- RegexGroupCollection.cs
- ComponentManagerBroker.cs
- GlyphRun.cs
- IfAction.cs
- XmlSchemaObject.cs
- DesignerRegionCollection.cs
- InsufficientMemoryException.cs
- PtsCache.cs
- Grid.cs
- Gdiplus.cs
- XmlSortKeyAccumulator.cs
- TypeExtension.cs
- WorkflowLayouts.cs
- ResourceReferenceExpression.cs
- IndexingContentUnit.cs
- MessageLoggingFilterTraceRecord.cs
- ReadOnlyPermissionSet.cs
- WorkflowRuntimeService.cs
- PeerEndPoint.cs
- ReferenceList.cs
- TransportChannelListener.cs
- XmlSchemaComplexContentRestriction.cs
- TransformGroup.cs
- ExceptionDetail.cs
- TranslateTransform3D.cs
- Geometry3D.cs
- XmlAnyElementAttribute.cs
- TypeUtil.cs
- EdmProviderManifest.cs
- GAC.cs
- ConfigurationSettings.cs
- StateWorkerRequest.cs
- ExpressionBinding.cs
- NodeFunctions.cs
- DataGridViewComboBoxCell.cs
- BindingMAnagerBase.cs
- RenderOptions.cs
- CompositionDesigner.cs
- ReflectEventDescriptor.cs
- VisualBasicSettingsHandler.cs
- HostedBindingBehavior.cs
- WindowsAuthenticationEventArgs.cs
- SurrogateChar.cs
- GridViewSelectEventArgs.cs
- DownloadProgressEventArgs.cs
- TextHidden.cs
- CreateRefExpr.cs
- OrthographicCamera.cs