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
- DetailsViewRowCollection.cs
- FixedSOMTextRun.cs
- RectAnimationUsingKeyFrames.cs
- HttpResponse.cs
- TreeViewItem.cs
- EventsTab.cs
- InputLanguageCollection.cs
- TransformerTypeCollection.cs
- InertiaTranslationBehavior.cs
- ToolStripMenuItem.cs
- ClientOperationFormatterProvider.cs
- ObjectViewQueryResultData.cs
- ClientTargetCollection.cs
- CorrelationScope.cs
- Membership.cs
- SoapIgnoreAttribute.cs
- CFGGrammar.cs
- SelectionItemPatternIdentifiers.cs
- IERequestCache.cs
- UriParserTemplates.cs
- PeerDuplexChannelListener.cs
- StringHandle.cs
- ListBase.cs
- CollectionTypeElement.cs
- SystemIPAddressInformation.cs
- ClientUtils.cs
- TemplateAction.cs
- WorkflowQueuingService.cs
- InputBuffer.cs
- SafeMILHandleMemoryPressure.cs
- NextPreviousPagerField.cs
- WSUtilitySpecificationVersion.cs
- Wildcard.cs
- DiagnosticsConfigurationHandler.cs
- EventEntry.cs
- SHA1Cng.cs
- JsonReaderWriterFactory.cs
- RequestCacheManager.cs
- ErrorFormatter.cs
- SettingsPropertyCollection.cs
- tibetanshape.cs
- PropertyToken.cs
- Matrix3D.cs
- SiteIdentityPermission.cs
- ThreadStateException.cs
- HttpWrapper.cs
- CounterSampleCalculator.cs
- DataBoundLiteralControl.cs
- Wildcard.cs
- CachedTypeface.cs
- DeploymentSection.cs
- FileCodeGroup.cs
- ListParagraph.cs
- InputGestureCollection.cs
- VBCodeProvider.cs
- ResourceExpressionBuilder.cs
- ImagingCache.cs
- ListQueryResults.cs
- EntityContainer.cs
- Triplet.cs
- UnionCodeGroup.cs
- GridSplitterAutomationPeer.cs
- TraceRecord.cs
- QuaternionAnimation.cs
- AuthenticationModulesSection.cs
- TextViewSelectionProcessor.cs
- InsufficientMemoryException.cs
- EventManager.cs
- SimpleTextLine.cs
- Timer.cs
- SchemaImporterExtensionElementCollection.cs
- RouteData.cs
- HatchBrush.cs
- HttpCapabilitiesEvaluator.cs
- ACE.cs
- EditorPart.cs
- D3DImage.cs
- MessageBox.cs
- InvalidProgramException.cs
- IgnorePropertiesAttribute.cs
- HyperLinkColumn.cs
- SingleTagSectionHandler.cs
- SqlDependency.cs
- ChainOfDependencies.cs
- QilFunction.cs
- CodeRemoveEventStatement.cs
- BinaryWriter.cs
- BitmapFrame.cs
- SolidColorBrush.cs
- WebControlToolBoxItem.cs
- BlurEffect.cs
- FlowDocumentReader.cs
- SelectorItemAutomationPeer.cs
- SecurityVerifiedMessage.cs
- AnimationClock.cs
- DesignerCalendarAdapter.cs
- TextSpan.cs
- MenuStrip.cs
- ProgressBar.cs
- Thread.cs