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
- WebPartConnectionCollection.cs
- ExtensionFile.cs
- ViewGenResults.cs
- MulticastOption.cs
- SystemIPGlobalStatistics.cs
- TextFormatter.cs
- XsltException.cs
- HtmlElement.cs
- TypeConvertions.cs
- FileDetails.cs
- ISAPIApplicationHost.cs
- DataObjectAttribute.cs
- DependencyPropertyKey.cs
- InternalDuplexChannelListener.cs
- PinnedBufferMemoryStream.cs
- InkCanvasAutomationPeer.cs
- RowToFieldTransformer.cs
- TransformGroup.cs
- CodeDesigner.cs
- ListViewGroup.cs
- dbenumerator.cs
- GPRECTF.cs
- DataTableMappingCollection.cs
- AcceptorSessionSymmetricTransportSecurityProtocol.cs
- SystemResourceHost.cs
- SettingsPropertyValueCollection.cs
- XmlElement.cs
- ShortcutKeysEditor.cs
- CodeNamespaceCollection.cs
- BuildProviderCollection.cs
- DescriptionAttribute.cs
- WebAdminConfigurationHelper.cs
- ExtentJoinTreeNode.cs
- PerfCounters.cs
- WebPartDeleteVerb.cs
- ExceptionAggregator.cs
- WebPartCollection.cs
- ThreadExceptionEvent.cs
- CardSpaceShim.cs
- QueryCacheEntry.cs
- SafePEFileHandle.cs
- _UriSyntax.cs
- StringOutput.cs
- CallInfo.cs
- TextEditorParagraphs.cs
- BeginGetFileNameFromUserRequest.cs
- uribuilder.cs
- BamlBinaryReader.cs
- PathGradientBrush.cs
- StatusBarPanelClickEvent.cs
- DBConnectionString.cs
- Point4D.cs
- SimplePropertyEntry.cs
- SqlInternalConnection.cs
- AnimationTimeline.cs
- Clause.cs
- DSASignatureDeformatter.cs
- ThreadStartException.cs
- ObjectQueryProvider.cs
- UpdateEventArgs.cs
- JsonReaderDelegator.cs
- AutomationPropertyInfo.cs
- DocumentPaginator.cs
- TdsParserHelperClasses.cs
- AQNBuilder.cs
- RepeaterItemEventArgs.cs
- AmbientValueAttribute.cs
- ResourcePermissionBaseEntry.cs
- ClientFormsIdentity.cs
- XmlCharCheckingReader.cs
- SecurityPolicySection.cs
- XmlNotation.cs
- Filter.cs
- TouchesCapturedWithinProperty.cs
- TextEditorDragDrop.cs
- HwndSourceKeyboardInputSite.cs
- SQLDoubleStorage.cs
- FieldMetadata.cs
- ParserStreamGeometryContext.cs
- PageContentAsyncResult.cs
- CanonicalizationDriver.cs
- CustomAttribute.cs
- DatagridviewDisplayedBandsData.cs
- PrimaryKeyTypeConverter.cs
- Math.cs
- _ConnectStream.cs
- SplineQuaternionKeyFrame.cs
- AnnotationResourceChangedEventArgs.cs
- EdmProviderManifest.cs
- DesignerRegion.cs
- WSDualHttpBindingElement.cs
- UseManagedPresentationElement.cs
- TextEditorTables.cs
- ProviderManager.cs
- StrokeNodeEnumerator.cs
- RetriableClipboard.cs
- ScriptServiceAttribute.cs
- HatchBrush.cs
- UnrecognizedPolicyAssertionElement.cs
- VisualBasicSettingsHandler.cs