Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / wpf / src / Core / CSharp / System / Windows / Input / FocusChangedEventArgs.cs / 1 / 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. 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
- XsltQilFactory.cs
- RuntimeConfig.cs
- MimeTypeMapper.cs
- PointAnimationBase.cs
- EdmEntityTypeAttribute.cs
- ICspAsymmetricAlgorithm.cs
- ListParagraph.cs
- AmbiguousMatchException.cs
- FileDialog.cs
- XmlQuerySequence.cs
- MessageSmuggler.cs
- InstanceKey.cs
- shaperfactoryquerycacheentry.cs
- AdditionalEntityFunctions.cs
- TdsParserStateObject.cs
- Baml2006ReaderContext.cs
- HyperLink.cs
- XmlSignatureManifest.cs
- DataGridViewAutoSizeColumnModeEventArgs.cs
- Rules.cs
- StrokeSerializer.cs
- BinaryWriter.cs
- LabelEditEvent.cs
- SupportsEventValidationAttribute.cs
- KeyNotFoundException.cs
- ControlType.cs
- ClrProviderManifest.cs
- WebMessageEncodingElement.cs
- Point3DValueSerializer.cs
- DynamicILGenerator.cs
- HttpCacheVaryByContentEncodings.cs
- XmlBinaryReader.cs
- DetailsViewPageEventArgs.cs
- Perspective.cs
- RealProxy.cs
- ToolStripDropDownMenu.cs
- PointValueSerializer.cs
- mda.cs
- XpsDigitalSignature.cs
- NumberSubstitution.cs
- ResourceExpressionBuilder.cs
- COSERVERINFO.cs
- SQLUtility.cs
- Object.cs
- sqlstateclientmanager.cs
- PixelFormat.cs
- TargetException.cs
- BitSet.cs
- DBBindings.cs
- DataExpression.cs
- SimplePropertyEntry.cs
- XmlBufferReader.cs
- SerializerWriterEventHandlers.cs
- FillBehavior.cs
- Decoder.cs
- AttributeCollection.cs
- SafeNativeMethodsOther.cs
- FreeFormDesigner.cs
- WindowsFormsDesignerOptionService.cs
- SectionInput.cs
- Ops.cs
- fixedPageContentExtractor.cs
- returneventsaver.cs
- SerialStream.cs
- DependencySource.cs
- FocusTracker.cs
- EncodingStreamWrapper.cs
- AssertValidation.cs
- TcpClientSocketManager.cs
- BamlTreeUpdater.cs
- XmlAttribute.cs
- XXXInfos.cs
- MdImport.cs
- FindCriteria.cs
- PtsContext.cs
- OdbcErrorCollection.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- HtmlInputButton.cs
- HandlerBase.cs
- PrinterUnitConvert.cs
- SqlDataReaderSmi.cs
- WindowsAuthenticationModule.cs
- RequestCacheManager.cs
- DataGridViewCellValueEventArgs.cs
- MaskedTextBoxDesigner.cs
- BinaryWriter.cs
- Error.cs
- SqlTypeSystemProvider.cs
- ManagementDateTime.cs
- EntityContainerRelationshipSetEnd.cs
- InteropAutomationProvider.cs
- _SingleItemRequestCache.cs
- WebServiceParameterData.cs
- DesignerActionUI.cs
- SecurityKeyEntropyMode.cs
- WindowsGraphics.cs
- Compiler.cs
- DesignerDataTableBase.cs
- XamlSerializationHelper.cs
- OutputCacheSettingsSection.cs