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
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SecurityContext.cs
- WpfKnownMemberInvoker.cs
- ImmutableObjectAttribute.cs
- ManagementEventWatcher.cs
- XmlQueryCardinality.cs
- ComplexLine.cs
- XPathAncestorIterator.cs
- Point3DKeyFrameCollection.cs
- XmlValidatingReader.cs
- CoTaskMemUnicodeSafeHandle.cs
- EmbeddedMailObject.cs
- EditingCoordinator.cs
- ReadWriteSpinLock.cs
- SqlPersonalizationProvider.cs
- TypefaceMap.cs
- GlobalEventManager.cs
- DigitShape.cs
- PersonalizationStateQuery.cs
- SkipStoryboardToFill.cs
- SocketAddress.cs
- DataColumn.cs
- HtmlTableCellCollection.cs
- indexingfiltermarshaler.cs
- FunctionParameter.cs
- RtfToXamlLexer.cs
- TextEditorContextMenu.cs
- CookieHandler.cs
- CodeThrowExceptionStatement.cs
- PrinterResolution.cs
- RayMeshGeometry3DHitTestResult.cs
- ValueTypeFixupInfo.cs
- FileLevelControlBuilderAttribute.cs
- GlyphingCache.cs
- Convert.cs
- BitmapEffectGroup.cs
- GPRECTF.cs
- FilterException.cs
- UnconditionalPolicy.cs
- PersonalizationState.cs
- RequestCacheEntry.cs
- PtsContext.cs
- MachineKeySection.cs
- ItemCollection.cs
- TableSectionStyle.cs
- BamlResourceContent.cs
- CriticalFinalizerObject.cs
- Literal.cs
- DbException.cs
- ConstraintEnumerator.cs
- Deflater.cs
- SqlCommandBuilder.cs
- ObjectStateEntryOriginalDbUpdatableDataRecord.cs
- XmlTypeMapping.cs
- ConfigUtil.cs
- FileUtil.cs
- AlignmentXValidation.cs
- TextShapeableCharacters.cs
- SafeFileMappingHandle.cs
- PopOutPanel.cs
- WindowsUpDown.cs
- DataFieldConverter.cs
- Msec.cs
- ListCollectionView.cs
- SvcMapFileLoader.cs
- SequentialUshortCollection.cs
- AssemblyHash.cs
- OracleRowUpdatingEventArgs.cs
- InlineUIContainer.cs
- ResourcePool.cs
- QueueProcessor.cs
- __Error.cs
- MatrixConverter.cs
- DrawingCollection.cs
- AuthenticationServiceManager.cs
- base64Transforms.cs
- Cursors.cs
- ExclusiveTcpListener.cs
- LinqDataSourceContextEventArgs.cs
- RepeatInfo.cs
- IgnoreFileBuildProvider.cs
- ListViewHitTestInfo.cs
- URLMembershipCondition.cs
- FileSecurity.cs
- XmlWriterSettings.cs
- TypeConverterAttribute.cs
- HighContrastHelper.cs
- IgnoreFlushAndCloseStream.cs
- ProgressPage.cs
- Operand.cs
- PropertyValue.cs
- DesignTimeSiteMapProvider.cs
- EasingKeyFrames.cs
- DescendentsWalker.cs
- Merger.cs
- GridView.cs
- SamlAssertionDirectKeyIdentifierClause.cs
- TimeoutException.cs
- ActivityStatusChangeEventArgs.cs
- Composition.cs
- NativeMethods.cs