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
- SafeCertificateContext.cs
- AppearanceEditorPart.cs
- Timer.cs
- XmlComplianceUtil.cs
- CheckableControlBaseAdapter.cs
- AddressAlreadyInUseException.cs
- DataControlFieldCell.cs
- MarkupObject.cs
- InternalCache.cs
- GridViewColumn.cs
- InvalidOperationException.cs
- Int64AnimationBase.cs
- DocumentReference.cs
- ResourceExpressionBuilder.cs
- WizardSideBarListControlItem.cs
- MemberAccessException.cs
- Hash.cs
- PreviewPageInfo.cs
- remotingproxy.cs
- ContentWrapperAttribute.cs
- CodeThrowExceptionStatement.cs
- ApplicationHost.cs
- NonParentingControl.cs
- Positioning.cs
- WebPartDisplayMode.cs
- InvalidContentTypeException.cs
- DetailsViewRowCollection.cs
- MailWriter.cs
- InternalResources.cs
- PartialTrustValidationBehavior.cs
- ServiceNameElement.cs
- Executor.cs
- WorkflowDesignerColors.cs
- TypeResolver.cs
- ContextMarshalException.cs
- Panel.cs
- Normalization.cs
- PkcsMisc.cs
- DataSetSchema.cs
- TextServicesProperty.cs
- CommandDevice.cs
- PerformanceCounter.cs
- MarkerProperties.cs
- PersonalizationAdministration.cs
- FileStream.cs
- DataGridViewSelectedCellCollection.cs
- CachedBitmap.cs
- MSG.cs
- ModelItemExtensions.cs
- ClosableStream.cs
- Rect.cs
- _ChunkParse.cs
- CustomAttributeBuilder.cs
- oledbmetadatacollectionnames.cs
- PeerEndPoint.cs
- GB18030Encoding.cs
- AuthStoreRoleProvider.cs
- PrivilegeNotHeldException.cs
- StaticDataManager.cs
- Instrumentation.cs
- DllHostInitializer.cs
- DataListItemCollection.cs
- PeerCollaboration.cs
- RouteItem.cs
- CatalogPartChrome.cs
- ResXBuildProvider.cs
- WindowsTab.cs
- SystemEvents.cs
- PaperSource.cs
- SetStateEventArgs.cs
- TextReturnReader.cs
- EncryptedReference.cs
- TabletCollection.cs
- ReliableOutputConnection.cs
- TimeManager.cs
- XmlRawWriterWrapper.cs
- MSG.cs
- FontStyleConverter.cs
- OdbcException.cs
- TraceSection.cs
- ExtensionMethods.cs
- DecimalAnimationBase.cs
- StopStoryboard.cs
- PropertyGridCommands.cs
- ToolStripDropDownClosedEventArgs.cs
- ConfigXmlCDataSection.cs
- SQLResource.cs
- XPathExpr.cs
- ProxyHwnd.cs
- MarkupObject.cs
- EntityProxyFactory.cs
- SspiHelper.cs
- ForeignKeyConstraint.cs
- SyndicationSerializer.cs
- TileBrush.cs
- XmlWhitespace.cs
- Vector3D.cs
- SystemColorTracker.cs
- BaseTemplateParser.cs
- xsdvalidator.cs