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
- EnumerableRowCollectionExtensions.cs
- HybridObjectCache.cs
- SystemSounds.cs
- XmlMapping.cs
- TypeSystemProvider.cs
- DataGridViewComboBoxColumn.cs
- DefaultBinder.cs
- CaretElement.cs
- CancellationToken.cs
- WindowsFormsHostAutomationPeer.cs
- SharedHttpsTransportManager.cs
- IndicFontClient.cs
- TextOutput.cs
- FamilyMapCollection.cs
- DCSafeHandle.cs
- DataSourceView.cs
- ToolStripPanelDesigner.cs
- PolyBezierSegment.cs
- SyndicationDeserializer.cs
- PolyQuadraticBezierSegment.cs
- HttpModuleActionCollection.cs
- TextViewBase.cs
- ItemsChangedEventArgs.cs
- AttachmentCollection.cs
- DoubleLink.cs
- WebPartCollection.cs
- SchemaTypeEmitter.cs
- CommentEmitter.cs
- ConfigXmlComment.cs
- SiteMapProvider.cs
- MergeLocalizationDirectives.cs
- GB18030Encoding.cs
- NonceToken.cs
- ViewEventArgs.cs
- FindRequestContext.cs
- ProcessHostMapPath.cs
- StatusBarAutomationPeer.cs
- TextBoxBase.cs
- NaturalLanguageHyphenator.cs
- HiddenFieldPageStatePersister.cs
- DataContractSerializerSection.cs
- ConversionContext.cs
- IApplicationTrustManager.cs
- Array.cs
- UnsafeNativeMethods.cs
- SAPICategories.cs
- ImportContext.cs
- Knowncolors.cs
- OleDbRowUpdatedEvent.cs
- DataRecordObjectView.cs
- EntityDesignPluralizationHandler.cs
- Zone.cs
- FlowDocumentScrollViewer.cs
- DataPagerField.cs
- VectorCollectionConverter.cs
- EmbeddedObject.cs
- MessageAction.cs
- DiscriminatorMap.cs
- XmlnsDefinitionAttribute.cs
- UserPreferenceChangingEventArgs.cs
- PageFunction.cs
- DelimitedListTraceListener.cs
- DesignerAutoFormat.cs
- AutomationAttributeInfo.cs
- EnumMember.cs
- RootBuilder.cs
- PrimitiveXmlSerializers.cs
- FontDialog.cs
- AuthenticationModulesSection.cs
- ListSurrogate.cs
- TypeGenericEnumerableViewSchema.cs
- PermissionRequestEvidence.cs
- CompositeDataBoundControl.cs
- DocumentPageViewAutomationPeer.cs
- TextRange.cs
- PointCollection.cs
- BinaryObjectInfo.cs
- HotCommands.cs
- RemoteCryptoRsaServiceProvider.cs
- OuterGlowBitmapEffect.cs
- CancellationTokenRegistration.cs
- TextRangeSerialization.cs
- Propagator.JoinPropagator.cs
- DynamicResourceExtension.cs
- DbConnectionPoolOptions.cs
- MatrixValueSerializer.cs
- MappableObjectManager.cs
- SqlIdentifier.cs
- StreamingContext.cs
- EventLogEntryCollection.cs
- DataTableTypeConverter.cs
- TextOutput.cs
- SetMemberBinder.cs
- DataGridViewRowCollection.cs
- COM2ExtendedBrowsingHandler.cs
- BaseDataList.cs
- recordstatefactory.cs
- DictionaryBase.cs
- _HTTPDateParse.cs
- MenuItemStyle.cs