Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- WebFormDesignerActionService.cs
- Material.cs
- FakeModelPropertyImpl.cs
- ObjectDataSourceFilteringEventArgs.cs
- WindowsStatusBar.cs
- TaskbarItemInfo.cs
- RenamedEventArgs.cs
- ExtensionsSection.cs
- EdmTypeAttribute.cs
- ProtocolViolationException.cs
- ActiveXContainer.cs
- FrameworkContentElement.cs
- COM2TypeInfoProcessor.cs
- ExpressionConverter.cs
- HttpRequestCacheValidator.cs
- PointHitTestParameters.cs
- SmiConnection.cs
- TemplateBuilder.cs
- DiscoveryInnerClientManaged11.cs
- CqlGenerator.cs
- COM2EnumConverter.cs
- IpcPort.cs
- RbTree.cs
- COM2PictureConverter.cs
- RightsManagementUser.cs
- TemplateColumn.cs
- SQLBinary.cs
- StringUtil.cs
- ToolStripArrowRenderEventArgs.cs
- TypeAccessException.cs
- _CacheStreams.cs
- UserControlDesigner.cs
- FrameworkContentElement.cs
- TextDocumentView.cs
- ObjectResult.cs
- SmiConnection.cs
- FloaterParagraph.cs
- Annotation.cs
- ProcessProtocolHandler.cs
- ContainerAction.cs
- ObjectContextServiceProvider.cs
- GB18030Encoding.cs
- DeferredElementTreeState.cs
- ServiceProviders.cs
- StatusBar.cs
- XmlParser.cs
- AttributeCollection.cs
- SizeChangedEventArgs.cs
- Int32Rect.cs
- XamlDesignerSerializationManager.cs
- DataSourceCache.cs
- IteratorFilter.cs
- SrgsText.cs
- ArcSegment.cs
- DesignBindingConverter.cs
- GeneralTransform3D.cs
- SectionInput.cs
- Reference.cs
- CorrelationManager.cs
- TaiwanCalendar.cs
- DataGridViewColumnCollectionDialog.cs
- ConnectionPoolRegistry.cs
- ScriptingRoleServiceSection.cs
- TypeUsage.cs
- FileUpload.cs
- ImageAnimator.cs
- ComEventsInfo.cs
- ObjectIDGenerator.cs
- GestureRecognitionResult.cs
- PkcsMisc.cs
- FileSystemWatcher.cs
- UpdatableGenericsFeature.cs
- DockPanel.cs
- PointValueSerializer.cs
- GenericTextProperties.cs
- NetNamedPipeSecurityMode.cs
- FormClosingEvent.cs
- SignatureDescription.cs
- WebPartUtil.cs
- UriTemplateTable.cs
- EventDescriptorCollection.cs
- TransformationRules.cs
- DataGridViewRowCancelEventArgs.cs
- JavascriptXmlWriterWrapper.cs
- DataSourceConverter.cs
- NamespaceList.cs
- ChangeToolStripParentVerb.cs
- AdRotator.cs
- DataGridAddNewRow.cs
- ColumnMap.cs
- SelectionPatternIdentifiers.cs
- DiscoveryClientReferences.cs
- HandlerBase.cs
- AssemblyBuilder.cs
- FreezableCollection.cs
- FieldMetadata.cs
- XmlComment.cs
- UnrecognizedAssertionsBindingElement.cs
- ComEventsSink.cs
- EmissiveMaterial.cs