Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / System / Windows / Input / FocusChangedEventArgs.cs / 1305600 / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DependencyPropertyKind.cs
- SmtpClient.cs
- ConfigurationHelpers.cs
- ExpressionLexer.cs
- UIAgentAsyncBeginRequest.cs
- BufferedWebEventProvider.cs
- PipeStream.cs
- ValueTable.cs
- IisTraceListener.cs
- WindowsSpinner.cs
- Timeline.cs
- Synchronization.cs
- ConstructorBuilder.cs
- ClientSession.cs
- XmlBinaryReader.cs
- translator.cs
- StorageEndPropertyMapping.cs
- KeyConverter.cs
- BmpBitmapDecoder.cs
- TrustManager.cs
- CodeDirectoryCompiler.cs
- SmtpNegotiateAuthenticationModule.cs
- RewritingValidator.cs
- BindingParameterCollection.cs
- ProxyManager.cs
- PartitionerStatic.cs
- EmptyImpersonationContext.cs
- DbConnectionStringCommon.cs
- ThreadAttributes.cs
- MarkupObject.cs
- SqlVisitor.cs
- VersionedStream.cs
- ColorConvertedBitmap.cs
- TableCellCollection.cs
- DataObjectFieldAttribute.cs
- SQLDouble.cs
- TextWriterEngine.cs
- returneventsaver.cs
- TextAutomationPeer.cs
- TemplateControlCodeDomTreeGenerator.cs
- CmsInterop.cs
- Brush.cs
- ReadOnlyHierarchicalDataSourceView.cs
- DrawingContextDrawingContextWalker.cs
- CompilerGlobalScopeAttribute.cs
- RectangleF.cs
- FormatterServices.cs
- SessionStateModule.cs
- AutomationPropertyInfo.cs
- BrowsableAttribute.cs
- SecurityManager.cs
- XmlElementCollection.cs
- Floater.cs
- UrlMapping.cs
- HtmlElementCollection.cs
- TraceContext.cs
- Literal.cs
- InfoCardService.cs
- RectAnimationUsingKeyFrames.cs
- TypeListConverter.cs
- DiscreteKeyFrames.cs
- GeometryHitTestParameters.cs
- OledbConnectionStringbuilder.cs
- XMLSchema.cs
- TemplateBindingExtensionConverter.cs
- InternalRelationshipCollection.cs
- PropertyRecord.cs
- ICspAsymmetricAlgorithm.cs
- DiscoveryEndpointValidator.cs
- XamlBuildTaskServices.cs
- KerberosReceiverSecurityToken.cs
- BulletedListEventArgs.cs
- XmlSchemaInfo.cs
- PermissionAttributes.cs
- InfoCardTrace.cs
- ArithmeticException.cs
- Inflater.cs
- ItemAutomationPeer.cs
- RefreshEventArgs.cs
- Journal.cs
- JournalEntryStack.cs
- VariableModifiersHelper.cs
- DateRangeEvent.cs
- NamespaceEmitter.cs
- StandardCommands.cs
- SQLBinaryStorage.cs
- SqlCommand.cs
- RoutedEvent.cs
- PersonalizationState.cs
- DurableInstanceContextProvider.cs
- AuthenticationException.cs
- ThicknessAnimation.cs
- XmlReaderDelegator.cs
- FormsAuthenticationUserCollection.cs
- GenericAuthenticationEventArgs.cs
- SchemaElementLookUpTableEnumerator.cs
- CompressedStack.cs
- AmbientLight.cs
- XmlnsCache.cs
- HostedImpersonationContext.cs