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
- QueryCursorEventArgs.cs
- AuthorizationRuleCollection.cs
- ChannelServices.cs
- StreamAsIStream.cs
- EventListenerClientSide.cs
- CoTaskMemUnicodeSafeHandle.cs
- PropertyPathWorker.cs
- MimeTypeMapper.cs
- UTF8Encoding.cs
- XPathNavigatorKeyComparer.cs
- ExtentCqlBlock.cs
- AssertUtility.cs
- TextParagraphView.cs
- ToolStripItemTextRenderEventArgs.cs
- LambdaCompiler.cs
- SqlPersonalizationProvider.cs
- DrawingVisual.cs
- TextPatternIdentifiers.cs
- CssTextWriter.cs
- MaskedTextBoxDesignerActionList.cs
- FontUnitConverter.cs
- XmlComplianceUtil.cs
- HostSecurityManager.cs
- Padding.cs
- ConnectivityStatus.cs
- MgmtResManager.cs
- filewebresponse.cs
- CompilerWrapper.cs
- SQLInt32Storage.cs
- OracleException.cs
- EraserBehavior.cs
- ColorComboBox.cs
- Context.cs
- BamlCollectionHolder.cs
- SimpleMailWebEventProvider.cs
- ExpressionCopier.cs
- _LazyAsyncResult.cs
- HttpInputStream.cs
- Encoder.cs
- Encoding.cs
- SchemaNames.cs
- DbExpressionVisitor.cs
- MachineKeyConverter.cs
- CodeDomSerializer.cs
- ProfileService.cs
- sqlser.cs
- HostedTcpTransportManager.cs
- TrackBarRenderer.cs
- RawMouseInputReport.cs
- RegexCapture.cs
- FlowDocumentPage.cs
- XPathParser.cs
- EventMappingSettingsCollection.cs
- BufferedReadStream.cs
- ExtensibleClassFactory.cs
- DictionaryItemsCollection.cs
- CardSpacePolicyElement.cs
- PersonalizationProviderHelper.cs
- StylusDevice.cs
- SafeLibraryHandle.cs
- COM2PropertyPageUITypeConverter.cs
- ThousandthOfEmRealDoubles.cs
- RegexParser.cs
- ProcessingInstructionAction.cs
- XmlSchemaAll.cs
- BinaryObjectInfo.cs
- ChtmlPhoneCallAdapter.cs
- HtmlValidatorAdapter.cs
- ReflectionPermission.cs
- ProfileManager.cs
- WebBaseEventKeyComparer.cs
- COSERVERINFO.cs
- SvcMapFile.cs
- FixedTextView.cs
- GradientStop.cs
- LayoutSettings.cs
- WebBaseEventKeyComparer.cs
- CopyOfAction.cs
- OdbcConnectionStringbuilder.cs
- GridView.cs
- OdbcConnectionStringbuilder.cs
- XPathAxisIterator.cs
- ServerIdentity.cs
- DeviceSpecific.cs
- ValidationSummary.cs
- XmlSchemaElement.cs
- BindingCompleteEventArgs.cs
- LogRestartAreaEnumerator.cs
- LineServices.cs
- StringValidatorAttribute.cs
- SessionPageStatePersister.cs
- UInt32Storage.cs
- GeneralTransform3DTo2D.cs
- XsltConvert.cs
- TableLayoutPanel.cs
- MethodToken.cs
- LayoutTable.cs
- BamlWriter.cs
- DateTimeUtil.cs
- _ShellExpression.cs