Code:
/ 4.0 / 4.0 / 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. 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
- Int32Storage.cs
- FileDialog_Vista.cs
- DrawingContextWalker.cs
- RotateTransform.cs
- ContentElementCollection.cs
- ProtocolsSection.cs
- storepermission.cs
- ExecutionContext.cs
- NativeBuffer.cs
- ImageAutomationPeer.cs
- DefaultPropertiesToSend.cs
- ConstraintManager.cs
- BinHexEncoder.cs
- ServerType.cs
- NavigationProperty.cs
- OrderablePartitioner.cs
- IndexedGlyphRun.cs
- BindingListCollectionView.cs
- XmlSchemaObject.cs
- CustomTypeDescriptor.cs
- AssertHelper.cs
- LinkDescriptor.cs
- CodeParameterDeclarationExpression.cs
- FlowDocumentReader.cs
- RotateTransform3D.cs
- SolidColorBrush.cs
- PreloadedPackages.cs
- DecoderNLS.cs
- EventListenerClientSide.cs
- MenuItemCollection.cs
- ChoiceConverter.cs
- externdll.cs
- XmlDictionaryReader.cs
- PageBreakRecord.cs
- WebConfigurationManager.cs
- TextDecorationLocationValidation.cs
- ToolStripStatusLabel.cs
- OptimalTextSource.cs
- PrinterSettings.cs
- DataPagerField.cs
- Vector.cs
- FacetValues.cs
- recordstatefactory.cs
- Viewport3DAutomationPeer.cs
- HealthMonitoringSectionHelper.cs
- IconConverter.cs
- InternalRelationshipCollection.cs
- CorrelationService.cs
- ColumnWidthChangingEvent.cs
- IBuiltInEvidence.cs
- UIElementCollection.cs
- TemplateKeyConverter.cs
- ColorAnimationUsingKeyFrames.cs
- ResXResourceWriter.cs
- PersonalizationProvider.cs
- KeyInfo.cs
- DrawingDrawingContext.cs
- ResourceDescriptionAttribute.cs
- FileSecurity.cs
- BeginSelectCardRequest.cs
- DetailsViewInsertEventArgs.cs
- TimeEnumHelper.cs
- FragmentNavigationEventArgs.cs
- XsdDuration.cs
- AssemblyBuilder.cs
- StoreAnnotationsMap.cs
- PseudoWebRequest.cs
- PermissionToken.cs
- DateBoldEvent.cs
- _NegotiateClient.cs
- DataGridViewRow.cs
- ListParagraph.cs
- TokenBasedSetEnumerator.cs
- BoundPropertyEntry.cs
- CompiledQueryCacheEntry.cs
- StreamingContext.cs
- RegexMatchCollection.cs
- Preprocessor.cs
- XmlNodeComparer.cs
- DataSetViewSchema.cs
- ProxyManager.cs
- XmlSchemaParticle.cs
- EdmPropertyAttribute.cs
- UnsafeNativeMethods.cs
- ReverseQueryOperator.cs
- StyleHelper.cs
- SoapBinding.cs
- SimpleMailWebEventProvider.cs
- Int16Converter.cs
- TraceContextEventArgs.cs
- TextRangeProviderWrapper.cs
- CodeThrowExceptionStatement.cs
- Publisher.cs
- ThreadAttributes.cs
- UrlMappingCollection.cs
- RuntimeWrappedException.cs
- SafeLibraryHandle.cs
- OleDbCommandBuilder.cs
- XmlNavigatorFilter.cs
- DrawingAttributesDefaultValueFactory.cs