Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / wpf / src / Core / CSharp / System / Windows / Input / FocusChangedEventArgs.cs / 1 / 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
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- BinaryObjectReader.cs
- ValueQuery.cs
- OleDbDataReader.cs
- ConfigXmlComment.cs
- DLinqAssociationProvider.cs
- OdbcParameter.cs
- ObjectViewEntityCollectionData.cs
- StatusBar.cs
- DocumentOutline.cs
- XmlSchemaAttribute.cs
- StyleXamlParser.cs
- XmlChildEnumerator.cs
- DiagnosticsConfigurationHandler.cs
- OracleInfoMessageEventArgs.cs
- CurrentChangingEventArgs.cs
- DataTableReaderListener.cs
- WebCategoryAttribute.cs
- DelayedRegex.cs
- PixelShader.cs
- PrintPreviewControl.cs
- securitycriticaldataClass.cs
- WebBodyFormatMessageProperty.cs
- Pen.cs
- UrlPropertyAttribute.cs
- BlurEffect.cs
- ObjectDataSourceEventArgs.cs
- HtmlTableRow.cs
- DynamicResourceExtension.cs
- DataGridParentRows.cs
- KeyFrames.cs
- IISMapPath.cs
- UIInitializationException.cs
- SignatureToken.cs
- DrawingAttributes.cs
- Run.cs
- ReadOnlyHierarchicalDataSource.cs
- Or.cs
- ButtonFieldBase.cs
- Constants.cs
- IgnoreFlushAndCloseStream.cs
- HandlerBase.cs
- DefaultValueAttribute.cs
- AutoGeneratedFieldProperties.cs
- FileChangesMonitor.cs
- DataGridViewUtilities.cs
- SqlWorkflowPersistenceService.cs
- OleDbCommand.cs
- Point.cs
- SoapFormatter.cs
- SingleSelectRootGridEntry.cs
- PipeConnection.cs
- ModelProperty.cs
- XmlCharType.cs
- NotifyParentPropertyAttribute.cs
- ExtenderControl.cs
- IdentityHolder.cs
- BulletedList.cs
- AttributeUsageAttribute.cs
- FormatterServices.cs
- PriorityQueue.cs
- DocumentPaginator.cs
- ContextTokenTypeConverter.cs
- CheckBoxBaseAdapter.cs
- InitializingNewItemEventArgs.cs
- HttpPostProtocolReflector.cs
- HttpRawResponse.cs
- Rect.cs
- SmiTypedGetterSetter.cs
- DiscoveryClientElement.cs
- ParserStreamGeometryContext.cs
- ExternalException.cs
- BindingMemberInfo.cs
- GraphicsContainer.cs
- EventTrigger.cs
- MultipartIdentifier.cs
- TreeNode.cs
- XmlSchemaSet.cs
- ContentPresenter.cs
- ServiceX509SecurityTokenProvider.cs
- _NetRes.cs
- MemberAccessException.cs
- ReferenceSchema.cs
- HtmlPhoneCallAdapter.cs
- ApplicationManager.cs
- PointLightBase.cs
- cache.cs
- PolyBezierSegmentFigureLogic.cs
- QilStrConcat.cs
- PipelineModuleStepContainer.cs
- SqlCacheDependencySection.cs
- BitmapMetadataEnumerator.cs
- CqlGenerator.cs
- CaseStatementProjectedSlot.cs
- TreeViewDesigner.cs
- HMACSHA384.cs
- ValueTypeFixupInfo.cs
- xmlsaver.cs
- NGCPageContentSerializerAsync.cs
- TemplateColumn.cs
- CompiledRegexRunnerFactory.cs