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
- ByteAnimationUsingKeyFrames.cs
- System.Data.OracleClient_BID.cs
- DictionaryEntry.cs
- OleDbParameter.cs
- ConfigXmlElement.cs
- Stylus.cs
- ReadWriteSpinLock.cs
- EventMap.cs
- UnmanagedMarshal.cs
- ApplicationDirectoryMembershipCondition.cs
- FunctionParameter.cs
- DoubleIndependentAnimationStorage.cs
- TextTreePropertyUndoUnit.cs
- Partitioner.cs
- FederatedMessageSecurityOverHttpElement.cs
- MetadataWorkspace.cs
- TextPattern.cs
- DockProviderWrapper.cs
- StringComparer.cs
- GetPageNumberCompletedEventArgs.cs
- CodeDelegateCreateExpression.cs
- DynamicObject.cs
- WebPartCloseVerb.cs
- XmlFormatExtensionPrefixAttribute.cs
- BitmapDecoder.cs
- TypeSystemHelpers.cs
- HtmlSelect.cs
- QueryStringParameter.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- ReliableSessionBindingElementImporter.cs
- NestedContainer.cs
- MbpInfo.cs
- ConfigXmlWhitespace.cs
- AuthenticationService.cs
- GlobalAllocSafeHandle.cs
- WindowsListViewItem.cs
- CompilerCollection.cs
- CalendarButton.cs
- FileUtil.cs
- BStrWrapper.cs
- SystemKeyConverter.cs
- LowerCaseStringConverter.cs
- Trace.cs
- wgx_exports.cs
- QilValidationVisitor.cs
- SchemaConstraints.cs
- KeyedQueue.cs
- MarshalByRefObject.cs
- StructureChangedEventArgs.cs
- EditorPartChrome.cs
- StorageComplexTypeMapping.cs
- EntityDataSourceSelectedEventArgs.cs
- DecoderBestFitFallback.cs
- RichTextBox.cs
- SmuggledIUnknown.cs
- DuplicateMessageDetector.cs
- TransformerTypeCollection.cs
- TargetInvocationException.cs
- DataListItemEventArgs.cs
- FloaterParagraph.cs
- Sql8ExpressionRewriter.cs
- Process.cs
- _NestedSingleAsyncResult.cs
- FixedHighlight.cs
- XmlSchemaSimpleContentExtension.cs
- QueryPrefixOp.cs
- DocumentGridContextMenu.cs
- DataGridViewMethods.cs
- TextEditorTyping.cs
- WindowPatternIdentifiers.cs
- Int32Rect.cs
- BinaryVersion.cs
- UriWriter.cs
- FlowDocumentScrollViewer.cs
- DbgUtil.cs
- RepeatInfo.cs
- Simplifier.cs
- PropertyGroupDescription.cs
- DatagridviewDisplayedBandsData.cs
- WindowsClientCredential.cs
- ResXDataNode.cs
- Quad.cs
- MLangCodePageEncoding.cs
- securitymgrsite.cs
- SafeProcessHandle.cs
- DrawListViewSubItemEventArgs.cs
- SqlTransaction.cs
- EncryptedType.cs
- BaseUriHelper.cs
- RuntimeConfigLKG.cs
- CounterSampleCalculator.cs
- CodeDomLoader.cs
- RightsManagementErrorHandler.cs
- AdapterUtil.cs
- AttributeUsageAttribute.cs
- ViewStateException.cs
- AlignmentXValidation.cs
- InvokePattern.cs
- ModuleBuilderData.cs
- SocketException.cs