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
- CuspData.cs
- DynamicRendererThreadManager.cs
- SQLRoleProvider.cs
- Msmq4SubqueuePoisonHandler.cs
- DataGridViewButtonColumn.cs
- EncodingNLS.cs
- ConfigXmlComment.cs
- DelegatingHeader.cs
- HttpMethodAttribute.cs
- DataGridColumnDropSeparator.cs
- VerticalAlignConverter.cs
- Thread.cs
- FontCollection.cs
- ObjectHelper.cs
- Size3DConverter.cs
- SqlWriter.cs
- WebHttpDispatchOperationSelector.cs
- AsymmetricAlgorithm.cs
- HostExecutionContextManager.cs
- ACE.cs
- XmlAttributeProperties.cs
- PartialTrustVisibleAssemblyCollection.cs
- SerializationInfoEnumerator.cs
- SID.cs
- Journaling.cs
- RichTextBox.cs
- EntityCollection.cs
- BitmapEffect.cs
- EditCommandColumn.cs
- XmlILConstructAnalyzer.cs
- SymbolEqualComparer.cs
- DispatchChannelSink.cs
- MenuScrollingVisibilityConverter.cs
- SecurityChannelFactory.cs
- PrinterResolution.cs
- Perspective.cs
- ConnectionStringSettingsCollection.cs
- EventLogConfiguration.cs
- ParallelTimeline.cs
- ConfigurationFileMap.cs
- followingsibling.cs
- ResolveNextArgumentWorkItem.cs
- DomNameTable.cs
- NativeObjectSecurity.cs
- OneOf.cs
- RootBuilder.cs
- BinarySerializer.cs
- Operand.cs
- SymbolMethod.cs
- XmlCountingReader.cs
- SslStream.cs
- IERequestCache.cs
- followingquery.cs
- ListControl.cs
- ListControl.cs
- AttributeSetAction.cs
- DataSourceXmlTextReader.cs
- DataControlButton.cs
- ADMembershipProvider.cs
- CheckableControlBaseAdapter.cs
- CodeTypeOfExpression.cs
- XmlMapping.cs
- BuildProviderInstallComponent.cs
- ExpressionConverter.cs
- DataGridTextColumn.cs
- AppSettingsReader.cs
- ECDiffieHellmanCngPublicKey.cs
- EventListenerClientSide.cs
- InternalBase.cs
- InkCanvasAutomationPeer.cs
- GlobalizationSection.cs
- DataConnectionHelper.cs
- WorkflowPageSetupDialog.cs
- TypeUsage.cs
- ContextMenuStripGroup.cs
- RawAppCommandInputReport.cs
- TextParagraph.cs
- RayMeshGeometry3DHitTestResult.cs
- TextEditorLists.cs
- SoapIncludeAttribute.cs
- DivideByZeroException.cs
- DataGridPagerStyle.cs
- PerformanceCounterPermissionAttribute.cs
- LocatorPart.cs
- ClientSession.cs
- DataSet.cs
- IISMapPath.cs
- ContextStaticAttribute.cs
- MobileCategoryAttribute.cs
- WindowsListViewSubItem.cs
- BindingContext.cs
- DesignTimeParseData.cs
- ColumnHeaderConverter.cs
- LocalBuilder.cs
- PerfService.cs
- Lasso.cs
- GeometryDrawing.cs
- XmlSchemaSimpleContentRestriction.cs
- SafeLocalMemHandle.cs
- Int32Collection.cs