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
- DataGridItemCollection.cs
- HttpApplication.cs
- ProxySimple.cs
- _IPv4Address.cs
- EntityDataSourceDesignerHelper.cs
- DeliveryStrategy.cs
- DataBindingHandlerAttribute.cs
- PropertyRef.cs
- OdbcDataReader.cs
- BatchWriter.cs
- TextSimpleMarkerProperties.cs
- ConfigUtil.cs
- TemplatePagerField.cs
- NativeMethods.cs
- StateRuntime.cs
- FillRuleValidation.cs
- ControlAdapter.cs
- AuthenticationServiceManager.cs
- Token.cs
- StaticDataManager.cs
- QueryResponse.cs
- AutomationElementIdentifiers.cs
- FrameworkObject.cs
- CustomErrorsSectionWrapper.cs
- EntityUtil.cs
- SHA384Managed.cs
- PackageRelationship.cs
- XmlCodeExporter.cs
- typedescriptorpermission.cs
- RijndaelManaged.cs
- XmlNodeChangedEventArgs.cs
- TagMapCollection.cs
- BaseCodePageEncoding.cs
- PackWebRequestFactory.cs
- QueryResponse.cs
- DropShadowBitmapEffect.cs
- _Events.cs
- TdsParserStateObject.cs
- BackStopAuthenticationModule.cs
- Hyperlink.cs
- ClickablePoint.cs
- SmtpLoginAuthenticationModule.cs
- FixedTextBuilder.cs
- EntityContainerEntitySetDefiningQuery.cs
- ImportContext.cs
- KnownBoxes.cs
- __Filters.cs
- ItemList.cs
- GlobalItem.cs
- ViewGenResults.cs
- Variable.cs
- CqlParser.cs
- BadImageFormatException.cs
- TextElement.cs
- EntityKeyElement.cs
- VerificationAttribute.cs
- RolePrincipal.cs
- ChannelServices.cs
- AstNode.cs
- SqlParameterCollection.cs
- BamlResourceSerializer.cs
- ToolStripGrip.cs
- KeyMatchBuilder.cs
- SystemEvents.cs
- FileDialog_Vista_Interop.cs
- DataGridPageChangedEventArgs.cs
- HierarchicalDataTemplate.cs
- X509ChainElement.cs
- IChannel.cs
- DbConnectionPool.cs
- BinaryFormatterWriter.cs
- AssemblyName.cs
- BitConverter.cs
- HttpCachePolicy.cs
- EventLogInternal.cs
- SerializationInfoEnumerator.cs
- COM2AboutBoxPropertyDescriptor.cs
- FunctionQuery.cs
- FileFormatException.cs
- LinkConverter.cs
- WebPartEditVerb.cs
- CounterCreationData.cs
- AppDomainFactory.cs
- ViewDesigner.cs
- StyleXamlTreeBuilder.cs
- SAPIEngineTypes.cs
- BuildResultCache.cs
- VirtualPathProvider.cs
- EventArgs.cs
- AttachInfo.cs
- CodeMemberProperty.cs
- unsafenativemethodstextservices.cs
- RandomNumberGenerator.cs
- ValueConversionAttribute.cs
- ListControl.cs
- DropShadowBitmapEffect.cs
- CacheChildrenQuery.cs
- SubpageParagraph.cs
- BitmapEffectOutputConnector.cs
- RadialGradientBrush.cs