Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- AssemblyBuilder.cs
- Base64Decoder.cs
- DefaultPropertyAttribute.cs
- OleDbReferenceCollection.cs
- ClockController.cs
- ImageMap.cs
- SerializerWriterEventHandlers.cs
- ServiceEndpoint.cs
- DrawListViewItemEventArgs.cs
- RawKeyboardInputReport.cs
- WebWorkflowRole.cs
- TreeNodeClickEventArgs.cs
- MessageTransmitTraceRecord.cs
- Registry.cs
- SafeProcessHandle.cs
- PathData.cs
- MsmqPoisonMessageException.cs
- RectangleF.cs
- Int64.cs
- ValidationHelper.cs
- ReadOnlyAttribute.cs
- Queue.cs
- TimelineCollection.cs
- AutoSizeToolBoxItem.cs
- InputElement.cs
- SchemaMapping.cs
- KeyBinding.cs
- SmiEventSink_Default.cs
- Atom10ItemFormatter.cs
- UpdatePanel.cs
- CompiledXpathExpr.cs
- DataPagerCommandEventArgs.cs
- SqlCacheDependencyDatabase.cs
- TransactionFlowProperty.cs
- DataGridViewCellStyleContentChangedEventArgs.cs
- SingleAnimationUsingKeyFrames.cs
- MasterPage.cs
- ClientConfigurationHost.cs
- WebPartUserCapability.cs
- TagPrefixInfo.cs
- XmlSchemaSet.cs
- Attributes.cs
- EntityDataSourceUtil.cs
- XmlDataSource.cs
- Validator.cs
- ReadOnlyCollectionBase.cs
- FreezableOperations.cs
- Int16KeyFrameCollection.cs
- TemplateColumn.cs
- contentDescriptor.cs
- LocalIdCollection.cs
- Funcletizer.cs
- MetadataArtifactLoaderResource.cs
- TextBoxBase.cs
- BitmapEffectInputData.cs
- HttpModuleCollection.cs
- OleDbException.cs
- PageCatalogPart.cs
- AssociationSetEnd.cs
- FixedPageStructure.cs
- InstallerTypeAttribute.cs
- BlurEffect.cs
- X509ClientCertificateCredentialsElement.cs
- InternalSendMessage.cs
- METAHEADER.cs
- HelpKeywordAttribute.cs
- CanonicalXml.cs
- LedgerEntryCollection.cs
- SqlFileStream.cs
- Opcode.cs
- DataGridColumnsPage.cs
- CodeIndexerExpression.cs
- ToolBarOverflowPanel.cs
- DisableDpiAwarenessAttribute.cs
- WindowsToolbarAsMenu.cs
- Utils.cs
- EntityModelSchemaGenerator.cs
- Pen.cs
- UndoManager.cs
- SwitchElementsCollection.cs
- ExpressionEditor.cs
- RadioButton.cs
- followingquery.cs
- ClientSettings.cs
- TemplateContentLoader.cs
- _LocalDataStoreMgr.cs
- XPathNodeIterator.cs
- Resources.Designer.cs
- WebSysDefaultValueAttribute.cs
- precedingquery.cs
- WindowsPrincipal.cs
- Inline.cs
- BamlVersionHeader.cs
- DataStorage.cs
- MarkerProperties.cs
- HttpBufferlessInputStream.cs
- SkipStoryboardToFill.cs
- Figure.cs
- TransactionContextValidator.cs
- Descriptor.cs