Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- Enum.cs
- Solver.cs
- MsmqIntegrationBindingCollectionElement.cs
- Int32.cs
- VideoDrawing.cs
- Separator.cs
- GACMembershipCondition.cs
- documentsequencetextpointer.cs
- SiteMapSection.cs
- FaultDesigner.cs
- TextEditorTables.cs
- Table.cs
- ConfigurationValues.cs
- ListView.cs
- Validator.cs
- DocumentXPathNavigator.cs
- ListViewInsertEventArgs.cs
- FieldBuilder.cs
- SystemFonts.cs
- UdpContractFilterBehavior.cs
- FontStretches.cs
- UrlPath.cs
- TextElementCollection.cs
- MetaType.cs
- WebPartMenu.cs
- Figure.cs
- Nodes.cs
- OdbcRowUpdatingEvent.cs
- UriSection.cs
- X509WindowsSecurityToken.cs
- SchemeSettingElementCollection.cs
- KeyConverter.cs
- ScrollProperties.cs
- PriorityRange.cs
- ActivityBindForm.cs
- Column.cs
- StringReader.cs
- Int32CAMarshaler.cs
- CursorInteropHelper.cs
- SqlMethods.cs
- _AutoWebProxyScriptWrapper.cs
- LongValidatorAttribute.cs
- ThreadAttributes.cs
- ThicknessAnimationUsingKeyFrames.cs
- Message.cs
- ConsoleKeyInfo.cs
- DeploymentExceptionMapper.cs
- ByteStreamGeometryContext.cs
- DataGrid.cs
- XmlAnyElementAttributes.cs
- SelectQueryOperator.cs
- XmlSchemaAttributeGroupRef.cs
- WebScriptClientGenerator.cs
- QueueProcessor.cs
- CodeTypeReferenceExpression.cs
- SafeSecurityHelper.cs
- TextRangeProviderWrapper.cs
- IDispatchConstantAttribute.cs
- TextParaLineResult.cs
- DefaultPropertyAttribute.cs
- FragmentQuery.cs
- ProcessStartInfo.cs
- CodeTryCatchFinallyStatement.cs
- SessionEndingEventArgs.cs
- HMAC.cs
- WindowsSpinner.cs
- NavigationWindow.cs
- WindowShowOrOpenTracker.cs
- InternalConfigEventArgs.cs
- DataGridAddNewRow.cs
- TableStyle.cs
- SelectionGlyph.cs
- GPPOINT.cs
- CqlBlock.cs
- PrintDialogDesigner.cs
- DynamicControl.cs
- BaseHashHelper.cs
- MetadataSerializer.cs
- ThaiBuddhistCalendar.cs
- NonParentingControl.cs
- WindowsToolbar.cs
- TextServicesProperty.cs
- GroupDescription.cs
- GeometryHitTestResult.cs
- SQLInt64.cs
- CheckBoxRenderer.cs
- PackagePart.cs
- TemplateBindingExtension.cs
- ClientProxyGenerator.cs
- ListBoxAutomationPeer.cs
- DatagridviewDisplayedBandsData.cs
- ConversionContext.cs
- MarkupExtensionParser.cs
- TextParagraph.cs
- TextEditorMouse.cs
- Line.cs
- VisualProxy.cs
- DocumentationServerProtocol.cs
- ProfilePropertyNameValidator.cs
- StylusSystemGestureEventArgs.cs