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
- AnnouncementClient.cs
- EventHandlersStore.cs
- UpdateTranslator.cs
- ResourceDictionary.cs
- HtmlShim.cs
- BinaryFormatterWriter.cs
- SpoolingTaskBase.cs
- DetectRunnableInstancesTask.cs
- MetabaseSettingsIis7.cs
- InputDevice.cs
- ListCollectionView.cs
- SwitchElementsCollection.cs
- NavigationExpr.cs
- CommonXSendMessage.cs
- ToolStripItemEventArgs.cs
- MenuItemCollectionEditor.cs
- SchemaElement.cs
- PerSessionInstanceContextProvider.cs
- WindowsRichEdit.cs
- XamlDesignerSerializationManager.cs
- BuildResult.cs
- VisualBasicReference.cs
- HandleExceptionArgs.cs
- TypeNameHelper.cs
- VisualProxy.cs
- CheckoutException.cs
- SHA1Cng.cs
- SecurityTokenValidationException.cs
- ActivityCodeGenerator.cs
- SetterTriggerConditionValueConverter.cs
- XmlWhitespace.cs
- UIAgentAsyncBeginRequest.cs
- ViewValidator.cs
- Window.cs
- StdRegProviderWrapper.cs
- FormViewPageEventArgs.cs
- Funcletizer.cs
- Assembly.cs
- MoveSizeWinEventHandler.cs
- wgx_render.cs
- WorkflowIdleElement.cs
- XPathNodePointer.cs
- GetWinFXPath.cs
- BindStream.cs
- _ChunkParse.cs
- SqlTypesSchemaImporter.cs
- DelimitedListTraceListener.cs
- SiblingIterators.cs
- DrawingState.cs
- CheckBoxBaseAdapter.cs
- FixedPage.cs
- SiteMapPath.cs
- assemblycache.cs
- Rfc2898DeriveBytes.cs
- __Filters.cs
- SaveCardRequest.cs
- AttributeEmitter.cs
- DataBindingsDialog.cs
- ImageMap.cs
- ServiceModelPerformanceCounters.cs
- DbReferenceCollection.cs
- InfoCardProofToken.cs
- CacheAxisQuery.cs
- Rijndael.cs
- FixedTextSelectionProcessor.cs
- EmptyEnumerator.cs
- IDQuery.cs
- UserInitiatedRoutedEventPermissionAttribute.cs
- mongolianshape.cs
- PingReply.cs
- TextUtf8RawTextWriter.cs
- ErrorTableItemStyle.cs
- NetStream.cs
- SeparatorAutomationPeer.cs
- TimeStampChecker.cs
- DaylightTime.cs
- StringSource.cs
- ListDictionary.cs
- SystemNetworkInterface.cs
- DbConnectionStringCommon.cs
- SelectiveScrollingGrid.cs
- DataServiceQueryException.cs
- DirectoryObjectSecurity.cs
- StylesEditorDialog.cs
- X509AsymmetricSecurityKey.cs
- UpdateManifestForBrowserApplication.cs
- MULTI_QI.cs
- XmlUtil.cs
- WebBrowserEvent.cs
- InstanceContextMode.cs
- Comparer.cs
- CatalogZone.cs
- ObjectDataProvider.cs
- GestureRecognizer.cs
- UrlMappingCollection.cs
- RawUIStateInputReport.cs
- FileReader.cs
- ListenDesigner.cs
- MailMessageEventArgs.cs
- AssociationSetEnd.cs