Code:
/ 4.0 / 4.0 / untmp / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- InternalBase.cs
- WindowsToolbarAsMenu.cs
- ExclusiveTcpTransportManager.cs
- TableHeaderCell.cs
- ThreadStateException.cs
- KeyGestureValueSerializer.cs
- SqlDataSourceQueryEditor.cs
- SelectionChangedEventArgs.cs
- FrameworkElement.cs
- PropertyDescriptorCollection.cs
- ScriptResourceHandler.cs
- OpacityConverter.cs
- TextElementCollection.cs
- CodeStatementCollection.cs
- NativeMethods.cs
- ObjectStateEntryDbUpdatableDataRecord.cs
- SeparatorAutomationPeer.cs
- VersionedStreamOwner.cs
- PerformanceCounterPermissionAttribute.cs
- AttributeUsageAttribute.cs
- WebPartPersonalization.cs
- PackageDigitalSignatureManager.cs
- OracleBoolean.cs
- ComponentEvent.cs
- FileSystemInfo.cs
- XpsThumbnail.cs
- Style.cs
- ObjectDataSourceEventArgs.cs
- DataSourceCacheDurationConverter.cs
- DockAndAnchorLayout.cs
- EraserBehavior.cs
- RolePrincipal.cs
- RequestedSignatureDialog.cs
- OleDbInfoMessageEvent.cs
- AssemblyBuilder.cs
- CommandBinding.cs
- GridItemProviderWrapper.cs
- WebPartCloseVerb.cs
- SchemaType.cs
- Label.cs
- StyleBamlRecordReader.cs
- TransactionBridge.cs
- FigureParaClient.cs
- EntityDataSourceDataSelection.cs
- BitmapDecoder.cs
- VisualStyleInformation.cs
- AuthenticationModulesSection.cs
- CapabilitiesState.cs
- ProfileSection.cs
- MULTI_QI.cs
- DataRowView.cs
- CacheSection.cs
- ResourceFallbackManager.cs
- HideDisabledControlAdapter.cs
- PanelStyle.cs
- WebPartDisplayModeEventArgs.cs
- RuleRef.cs
- PrivilegeNotHeldException.cs
- InvokeProviderWrapper.cs
- SqlErrorCollection.cs
- FunctionDetailsReader.cs
- EventMetadata.cs
- TableCellAutomationPeer.cs
- NameValueConfigurationElement.cs
- DataViewManagerListItemTypeDescriptor.cs
- RegexWorker.cs
- CommonRemoteMemoryBlock.cs
- SettingsProviderCollection.cs
- XmlQueryCardinality.cs
- BitmapEffectInput.cs
- BufferModeSettings.cs
- MatrixTransform.cs
- ISAPIApplicationHost.cs
- TiffBitmapDecoder.cs
- ApplicationActivator.cs
- NetworkCredential.cs
- User.cs
- StandardToolWindows.cs
- AttachmentCollection.cs
- EntityTypeEmitter.cs
- SectionRecord.cs
- ArgumentsParser.cs
- ErrorRuntimeConfig.cs
- SimpleApplicationHost.cs
- ReverseComparer.cs
- RelativeSource.cs
- TypeElement.cs
- Emitter.cs
- DataControlLinkButton.cs
- RemotingConfiguration.cs
- CodeAttributeArgumentCollection.cs
- DbParameterCollectionHelper.cs
- OuterGlowBitmapEffect.cs
- Viewport2DVisual3D.cs
- ContextMenuService.cs
- DelegateTypeInfo.cs
- MatrixCamera.cs
- Vector3DCollectionValueSerializer.cs
- TranslateTransform3D.cs
- PageThemeParser.cs