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
- UniqueIdentifierService.cs
- TemplateBindingExtensionConverter.cs
- storepermission.cs
- WebPartDescriptionCollection.cs
- OracleLob.cs
- EventPrivateKey.cs
- HasCopySemanticsAttribute.cs
- ApplicationInfo.cs
- SymbolPair.cs
- ButtonBaseAutomationPeer.cs
- BufferedGraphicsManager.cs
- LogSwitch.cs
- ConfigurationSection.cs
- base64Transforms.cs
- IntSecurity.cs
- WindowsGrip.cs
- ImageDrawing.cs
- BinaryNode.cs
- Utils.cs
- PartitionedDataSource.cs
- DesignerSerializationVisibilityAttribute.cs
- ClientProtocol.cs
- EntityDataSourceContextCreatedEventArgs.cs
- FirewallWrapper.cs
- SqlAggregateChecker.cs
- NamespaceDecl.cs
- EntityException.cs
- XmlAggregates.cs
- ComplexTypeEmitter.cs
- WebConfigurationHost.cs
- InputDevice.cs
- ZoneLinkButton.cs
- EpmTargetTree.cs
- AtomServiceDocumentSerializer.cs
- PreviewPageInfo.cs
- XmlSchemaAnyAttribute.cs
- WindowsIdentity.cs
- GlyphShapingProperties.cs
- TextBoxBase.cs
- Int32CAMarshaler.cs
- RenderData.cs
- SqlExpander.cs
- DataServiceQuery.cs
- HtmlTextArea.cs
- path.cs
- GestureRecognitionResult.cs
- HttpConfigurationContext.cs
- MemberHolder.cs
- UnsafeNativeMethods.cs
- DataGridViewCellEventArgs.cs
- SequenceQuery.cs
- ToolStrip.cs
- TextElementAutomationPeer.cs
- InlineUIContainer.cs
- RoutedEventConverter.cs
- LayoutEditorPart.cs
- PropertySet.cs
- PrintingPermission.cs
- GlyphsSerializer.cs
- XmlDocumentFragment.cs
- hwndwrapper.cs
- HtmlWindowCollection.cs
- BindValidator.cs
- ParagraphVisual.cs
- RbTree.cs
- WebBrowserProgressChangedEventHandler.cs
- XmlComplianceUtil.cs
- DataGridPageChangedEventArgs.cs
- TableDetailsRow.cs
- LinkUtilities.cs
- PackWebRequest.cs
- RunInstallerAttribute.cs
- SchemaImporterExtensionElement.cs
- MailWriter.cs
- XmlDocumentViewSchema.cs
- AnnotationHelper.cs
- PartialList.cs
- SqlCommand.cs
- SoapCodeExporter.cs
- SimpleWorkerRequest.cs
- DotExpr.cs
- HtmlInputText.cs
- SpellerHighlightLayer.cs
- RSAPKCS1SignatureDeformatter.cs
- InputProcessorProfilesLoader.cs
- ExplicitDiscriminatorMap.cs
- ListViewGroupConverter.cs
- figurelength.cs
- GeometryGroup.cs
- Transform3D.cs
- ResourceContainer.cs
- URLMembershipCondition.cs
- StickyNoteAnnotations.cs
- ConnectionProviderAttribute.cs
- StyleCollectionEditor.cs
- SessionPageStateSection.cs
- EncodingTable.cs
- FormsAuthenticationEventArgs.cs
- Registration.cs
- UITypeEditor.cs