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

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ClientScriptManager.cs
- DriveNotFoundException.cs
- OdbcPermission.cs
- DataTransferEventArgs.cs
- ToolTip.cs
- ProbeMatchesMessage11.cs
- ListViewInsertEventArgs.cs
- MsmqTransportSecurityElement.cs
- SizeAnimationUsingKeyFrames.cs
- InlinedAggregationOperator.cs
- ConfigXmlAttribute.cs
- RegexRunner.cs
- DiscreteKeyFrames.cs
- MetabaseServerConfig.cs
- FixedSOMTableRow.cs
- PerspectiveCamera.cs
- SafeNativeMethods.cs
- EpmTargetPathSegment.cs
- XmlDocumentType.cs
- WebServiceEndpoint.cs
- OperationCanceledException.cs
- CatalogPartChrome.cs
- _NegotiateClient.cs
- Trigger.cs
- TextSelectionHelper.cs
- TemplateControlParser.cs
- PrimitiveOperationFormatter.cs
- SchemaConstraints.cs
- CodeDelegateInvokeExpression.cs
- ListBoxAutomationPeer.cs
- SwitchLevelAttribute.cs
- DrawingBrush.cs
- URLIdentityPermission.cs
- DateTime.cs
- DragDropHelper.cs
- TlsSspiNegotiation.cs
- AtomPub10ServiceDocumentFormatter.cs
- DataGridLinkButton.cs
- PersonalizationState.cs
- SafeNativeMethods.cs
- PtsContext.cs
- RadioButton.cs
- Section.cs
- AppDomain.cs
- ZipIOExtraField.cs
- Rotation3DAnimationUsingKeyFrames.cs
- TextBox.cs
- FormParameter.cs
- ServiceObjectContainer.cs
- ControlAdapter.cs
- EmbeddedMailObject.cs
- EntitySetBaseCollection.cs
- MultiplexingFormatMapping.cs
- GPPOINT.cs
- EntityStoreSchemaGenerator.cs
- HuffmanTree.cs
- BinaryFormatterWriter.cs
- DesignOnlyAttribute.cs
- EditingMode.cs
- ScriptingProfileServiceSection.cs
- TextBlock.cs
- XmlParser.cs
- Focus.cs
- TypeValidationEventArgs.cs
- WpfKnownTypeInvoker.cs
- ReadonlyMessageFilter.cs
- RawStylusInputCustomData.cs
- FormsAuthenticationCredentials.cs
- iisPickupDirectory.cs
- ReadOnlyDictionary.cs
- DirectionalLight.cs
- BooleanStorage.cs
- DataSourceGroupCollection.cs
- CompositionDesigner.cs
- ComUdtElement.cs
- BatchServiceHost.cs
- StateMachine.cs
- HorizontalAlignConverter.cs
- State.cs
- ForeignKeyConstraint.cs
- TimeSpanMinutesConverter.cs
- DetailsViewCommandEventArgs.cs
- BasePattern.cs
- ChildDocumentBlock.cs
- StatusBar.cs
- CodeCompileUnit.cs
- OperatorExpressions.cs
- DiscoveryServerProtocol.cs
- WorkflowPrinting.cs
- ByteStream.cs
- MethodCallTranslator.cs
- ExceptionHandlers.cs
- SqlUtil.cs
- SoapElementAttribute.cs
- Msec.cs
- DomainUpDown.cs
- Evaluator.cs
- RoutedPropertyChangedEventArgs.cs
- CachedTypeface.cs
- Helper.cs