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
- MenuItem.cs
- ToolboxCategory.cs
- JavaScriptSerializer.cs
- AsyncWaitHandle.cs
- XPathNodePointer.cs
- CustomErrorsSection.cs
- BigInt.cs
- ObjectReferenceStack.cs
- GroupLabel.cs
- PipelineDeploymentState.cs
- GridViewColumnHeaderAutomationPeer.cs
- LogSwitch.cs
- SmiEventSink.cs
- EncoderReplacementFallback.cs
- TableLayoutPanelDesigner.cs
- SynchronizationValidator.cs
- StyleBamlRecordReader.cs
- AutomationPatternInfo.cs
- ProtocolViolationException.cs
- PropertySourceInfo.cs
- FlagsAttribute.cs
- followingquery.cs
- TreePrinter.cs
- TextMarkerSource.cs
- WeakRefEnumerator.cs
- HandleRef.cs
- ClientTargetSection.cs
- SerialPinChanges.cs
- DBCSCodePageEncoding.cs
- FlowDocumentPaginator.cs
- TreeNode.cs
- WmlCommandAdapter.cs
- CornerRadius.cs
- XPathDescendantIterator.cs
- _Semaphore.cs
- AddInAdapter.cs
- DesignerCatalogPartChrome.cs
- TargetException.cs
- PassportAuthentication.cs
- DBSchemaRow.cs
- FilteredReadOnlyMetadataCollection.cs
- InternalUserCancelledException.cs
- ViewPort3D.cs
- Control.cs
- WebRequest.cs
- TemplatedMailWebEventProvider.cs
- IsolatedStorageFilePermission.cs
- KeyGestureConverter.cs
- ComponentSerializationService.cs
- EnumerableCollectionView.cs
- StorageRoot.cs
- WebBrowserEvent.cs
- SmtpNetworkElement.cs
- HtmlString.cs
- AsymmetricAlgorithm.cs
- MasterPageParser.cs
- Msec.cs
- BinaryObjectReader.cs
- MsmqIntegrationAppDomainProtocolHandler.cs
- CacheMemory.cs
- MimeXmlImporter.cs
- CodeGenerator.cs
- AvTraceFormat.cs
- BamlLocalizableResource.cs
- CodeFieldReferenceExpression.cs
- EnumerableWrapperWeakToStrong.cs
- TransactionFlowBindingElement.cs
- RepeaterItem.cs
- XmlResolver.cs
- SelectionProcessor.cs
- ReverseComparer.cs
- HttpInputStream.cs
- PropertyDescriptorComparer.cs
- ControlOperationBehavior.cs
- QilSortKey.cs
- MarkupCompilePass2.cs
- AdornedElementPlaceholder.cs
- BinaryReader.cs
- BitmapEffectGroup.cs
- CommonRemoteMemoryBlock.cs
- TextCharacters.cs
- SharedPerformanceCounter.cs
- QilChoice.cs
- CodeMemberMethod.cs
- BindingMAnagerBase.cs
- HttpCacheVaryByContentEncodings.cs
- Control.cs
- DeclaredTypeValidator.cs
- MultiTrigger.cs
- OLEDB_Util.cs
- GuidelineCollection.cs
- TextParaLineResult.cs
- ControlUtil.cs
- AttachedAnnotationChangedEventArgs.cs
- HttpProcessUtility.cs
- TableCellCollection.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- PropertyToken.cs
- ConcurrentDictionary.cs
- Size.cs