Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- XmlTextWriter.cs
- StylusPointPropertyUnit.cs
- TableProvider.cs
- OleDbSchemaGuid.cs
- ComMethodElement.cs
- AssemblyBuilderData.cs
- FontCacheUtil.cs
- StringValidatorAttribute.cs
- ExpressionBuilder.cs
- CellTreeNode.cs
- TablePattern.cs
- TableCellAutomationPeer.cs
- XmlSerializationWriter.cs
- ToolStripActionList.cs
- AbstractSvcMapFileLoader.cs
- MouseButtonEventArgs.cs
- ProgressChangedEventArgs.cs
- ReflectTypeDescriptionProvider.cs
- RecognizeCompletedEventArgs.cs
- Int64AnimationUsingKeyFrames.cs
- CodeExporter.cs
- ApplicationServiceHelper.cs
- UIElement3D.cs
- DecoderBestFitFallback.cs
- UserThread.cs
- Message.cs
- HitTestDrawingContextWalker.cs
- PageAsyncTask.cs
- DetailsViewUpdatedEventArgs.cs
- InputReportEventArgs.cs
- ResourceDisplayNameAttribute.cs
- CipherData.cs
- FlowDocumentScrollViewerAutomationPeer.cs
- BufferModeSettings.cs
- ActivityAction.cs
- SqlDataRecord.cs
- HttpCapabilitiesEvaluator.cs
- NeutralResourcesLanguageAttribute.cs
- ParenthesizePropertyNameAttribute.cs
- DrawingImage.cs
- Storyboard.cs
- PropertyGridCommands.cs
- FormClosingEvent.cs
- EditBehavior.cs
- GenerateScriptTypeAttribute.cs
- ProtocolViolationException.cs
- ErrorEventArgs.cs
- _LazyAsyncResult.cs
- GraphicsContext.cs
- HttpWebRequest.cs
- MembershipUser.cs
- ChangeBlockUndoRecord.cs
- Literal.cs
- ServiceDescriptionSerializer.cs
- QilInvokeLateBound.cs
- Line.cs
- EllipseGeometry.cs
- WebPartRestoreVerb.cs
- AsnEncodedData.cs
- ContractUtils.cs
- Pts.cs
- MaterializeFromAtom.cs
- IisTraceWebEventProvider.cs
- SqlProcedureAttribute.cs
- DateTime.cs
- SafeMILHandleMemoryPressure.cs
- COM2TypeInfoProcessor.cs
- SqlTransaction.cs
- OleDbConnectionFactory.cs
- SettingsPropertyCollection.cs
- InheritedPropertyChangedEventArgs.cs
- WindowsFormsHostAutomationPeer.cs
- WaitHandle.cs
- DataGridRow.cs
- ScrollViewer.cs
- XmlWrappingWriter.cs
- RichTextBoxAutomationPeer.cs
- GraphicsPathIterator.cs
- ByteBufferPool.cs
- ContentElement.cs
- FileResponseElement.cs
- SqlBulkCopy.cs
- SignedPkcs7.cs
- MenuBindingsEditor.cs
- ProjectionCamera.cs
- _Win32.cs
- DoWorkEventArgs.cs
- Icon.cs
- ObjectViewEntityCollectionData.cs
- BitmapPalettes.cs
- WeakHashtable.cs
- ArraySortHelper.cs
- DatagridviewDisplayedBandsData.cs
- LinearGradientBrush.cs
- DateTimeOffset.cs
- LineServicesRun.cs
- XmlSchemaAttributeGroup.cs
- VariableBinder.cs
- KnownAssembliesSet.cs
- ping.cs