Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / wpf / src / Core / CSharp / System / Windows / Input / FocusChangedEventArgs.cs / 1 / FocusChangedEventArgs.cs
using System; using SR=MS.Internal.PresentationCore.SR; using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Input { ////// The KeyboardFocusChangedEventArgs class contains information about key states. /// public class KeyboardFocusChangedEventArgs : KeyboardEventArgs { ////// Constructs an instance of the KeyboardFocusChangedEventArgs class. /// /// /// The logical keyboard device associated with this event. /// /// /// The time when the input occured. /// /// /// The element that previously had focus. /// /// /// The element that now has focus. /// public KeyboardFocusChangedEventArgs(KeyboardDevice keyboard, int timestamp, IInputElement oldFocus, IInputElement newFocus) : base(keyboard, timestamp) { if (oldFocus != null && !InputElement.IsValid(oldFocus)) throw new InvalidOperationException(SR.Get(SRID.Invalid_IInputElement, oldFocus.GetType())); if (newFocus != null && !InputElement.IsValid(newFocus)) throw new InvalidOperationException(SR.Get(SRID.Invalid_IInputElement, newFocus.GetType())); _oldFocus = oldFocus; _newFocus = newFocus; } ////// The element that previously had focus. /// public IInputElement OldFocus { get {return _oldFocus;} } ////// The element that now has focus. /// public IInputElement NewFocus { get {return _newFocus;} } ////// The mechanism used to call the type-specific handler on the /// target. /// /// /// The generic handler to call in a type-specific way. /// /// /// The target to call the handler on. /// protected override void InvokeEventHandler(Delegate genericHandler, object genericTarget) { KeyboardFocusChangedEventHandler handler = (KeyboardFocusChangedEventHandler) genericHandler; handler(genericTarget, this); } private IInputElement _oldFocus; private IInputElement _newFocus; } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. using System; using SR=MS.Internal.PresentationCore.SR; using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Input { ////// The KeyboardFocusChangedEventArgs class contains information about key states. /// public class KeyboardFocusChangedEventArgs : KeyboardEventArgs { ////// Constructs an instance of the KeyboardFocusChangedEventArgs class. /// /// /// The logical keyboard device associated with this event. /// /// /// The time when the input occured. /// /// /// The element that previously had focus. /// /// /// The element that now has focus. /// public KeyboardFocusChangedEventArgs(KeyboardDevice keyboard, int timestamp, IInputElement oldFocus, IInputElement newFocus) : base(keyboard, timestamp) { if (oldFocus != null && !InputElement.IsValid(oldFocus)) throw new InvalidOperationException(SR.Get(SRID.Invalid_IInputElement, oldFocus.GetType())); if (newFocus != null && !InputElement.IsValid(newFocus)) throw new InvalidOperationException(SR.Get(SRID.Invalid_IInputElement, newFocus.GetType())); _oldFocus = oldFocus; _newFocus = newFocus; } ////// The element that previously had focus. /// public IInputElement OldFocus { get {return _oldFocus;} } ////// The element that now has focus. /// public IInputElement NewFocus { get {return _newFocus;} } ////// The mechanism used to call the type-specific handler on the /// target. /// /// /// The generic handler to call in a type-specific way. /// /// /// The target to call the handler on. /// protected override void InvokeEventHandler(Delegate genericHandler, object genericTarget) { KeyboardFocusChangedEventHandler handler = (KeyboardFocusChangedEventHandler) genericHandler; handler(genericTarget, this); } private IInputElement _oldFocus; private IInputElement _newFocus; } } // 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
- TextDocumentView.cs
- Image.cs
- StringFreezingAttribute.cs
- ToolStrip.cs
- _TimerThread.cs
- SignedPkcs7.cs
- ExponentialEase.cs
- CatalogZoneBase.cs
- XPathNavigator.cs
- PageMediaType.cs
- WorkflowOwnershipException.cs
- ExpandCollapsePattern.cs
- XhtmlConformanceSection.cs
- QueryTask.cs
- HatchBrush.cs
- PrincipalPermissionMode.cs
- StringValueConverter.cs
- PrintPreviewGraphics.cs
- State.cs
- MeshGeometry3D.cs
- BinaryCommonClasses.cs
- CodeDirectoryCompiler.cs
- WarningException.cs
- ListViewDataItem.cs
- RelationshipSet.cs
- Win32.cs
- SoapFormatter.cs
- FixedSOMPageConstructor.cs
- CmsUtils.cs
- BasicExpressionVisitor.cs
- CacheMemory.cs
- UrlAuthFailureHandler.cs
- COM2PictureConverter.cs
- MsmqReceiveParameters.cs
- WebPartsSection.cs
- SafeHandle.cs
- XmlHierarchicalDataSourceView.cs
- WebServiceErrorEvent.cs
- InkCanvasSelection.cs
- ObjectConverter.cs
- SqlFileStream.cs
- XmlnsDictionary.cs
- JournalNavigationScope.cs
- ValidationEventArgs.cs
- SHA256Managed.cs
- DataSetMappper.cs
- XPathItem.cs
- XmlTextReaderImpl.cs
- newitemfactory.cs
- SafeWaitHandle.cs
- StringSource.cs
- ChtmlImageAdapter.cs
- CustomLineCap.cs
- DataGridViewAutoSizeModeEventArgs.cs
- XmlNode.cs
- SemanticResultKey.cs
- TextBreakpoint.cs
- WebPartHeaderCloseVerb.cs
- StorageEntityContainerMapping.cs
- IFlowDocumentViewer.cs
- SafeBitVector32.cs
- TagPrefixCollection.cs
- ChildTable.cs
- DoubleAnimationClockResource.cs
- TypeForwardedToAttribute.cs
- DataGridCaption.cs
- ResourceManager.cs
- PassportAuthenticationEventArgs.cs
- DataSourceCache.cs
- HostProtectionException.cs
- BindingValueChangedEventArgs.cs
- DataRecordObjectView.cs
- DataKeyCollection.cs
- ReservationCollection.cs
- TextHidden.cs
- XmlSchemaObjectTable.cs
- TreeViewCancelEvent.cs
- EntityDataSourceView.cs
- UInt64Converter.cs
- ToolBarTray.cs
- PropertyItemInternal.cs
- ColumnReorderedEventArgs.cs
- BoolLiteral.cs
- basecomparevalidator.cs
- CompiledAction.cs
- SchemaType.cs
- ExternalException.cs
- FixedPageAutomationPeer.cs
- ExtensionWindowResizeGrip.cs
- RemotingConfiguration.cs
- DataGridHyperlinkColumn.cs
- EventLogEntryCollection.cs
- SmtpAuthenticationManager.cs
- TextEditorCharacters.cs
- PropertyMapper.cs
- OdbcConnectionPoolProviderInfo.cs
- SplineKeyFrames.cs
- ToolStripItemImageRenderEventArgs.cs
- BindingListCollectionView.cs
- XamlBuildTaskServices.cs