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
- ItemList.cs
- EdmValidator.cs
- CryptoApi.cs
- WebRequest.cs
- WindowsSecurityTokenAuthenticator.cs
- TypedTableBaseExtensions.cs
- AttributeEmitter.cs
- safesecurityhelperavalon.cs
- BooleanAnimationBase.cs
- FileChangesMonitor.cs
- IconConverter.cs
- SortedSetDebugView.cs
- HotCommands.cs
- TypeToArgumentTypeConverter.cs
- ObjectViewFactory.cs
- ADRoleFactoryConfiguration.cs
- FormsAuthentication.cs
- CommonDialog.cs
- RuleSettingsCollection.cs
- PostBackOptions.cs
- AuthenticationSection.cs
- MarginsConverter.cs
- CombinedTcpChannel.cs
- ValueTypeFixupInfo.cs
- LostFocusEventManager.cs
- ModelItemImpl.cs
- MessageBox.cs
- AttributeEmitter.cs
- UserMapPath.cs
- ControlEvent.cs
- FixedDocumentPaginator.cs
- RepeatButton.cs
- MouseCaptureWithinProperty.cs
- PropertyEntry.cs
- CqlLexerHelpers.cs
- KeyMatchBuilder.cs
- SendOperation.cs
- OleCmdHelper.cs
- RemotingClientProxy.cs
- ImportOptions.cs
- VariantWrapper.cs
- SafeBuffer.cs
- TempFiles.cs
- GenericEnumerator.cs
- HideDisabledControlAdapter.cs
- MissingMethodException.cs
- DiagnosticsConfiguration.cs
- DbSource.cs
- SortQueryOperator.cs
- Tokenizer.cs
- RangeValueProviderWrapper.cs
- DragEvent.cs
- Graphics.cs
- QilLoop.cs
- CodeCompileUnit.cs
- PresentationTraceSources.cs
- XamlWriterExtensions.cs
- CodeGroup.cs
- CompensationDesigner.cs
- SerialReceived.cs
- XmlChoiceIdentifierAttribute.cs
- ZipIOZip64EndOfCentralDirectoryBlock.cs
- RawStylusInputCustomDataList.cs
- AccessDataSource.cs
- XmlUrlResolver.cs
- ContentElement.cs
- WindowsSolidBrush.cs
- DataDesignUtil.cs
- iisPickupDirectory.cs
- XmlDataImplementation.cs
- MtomMessageEncodingBindingElement.cs
- TraceUtils.cs
- RegexGroup.cs
- AutoSizeToolBoxItem.cs
- DispatcherExceptionEventArgs.cs
- XamlGridLengthSerializer.cs
- ServerProtocol.cs
- AutoGeneratedField.cs
- GlyphRun.cs
- Simplifier.cs
- QueryTask.cs
- DetailsViewAutoFormat.cs
- RtfToXamlLexer.cs
- DbProviderFactory.cs
- DbConnectionPoolIdentity.cs
- InstalledFontCollection.cs
- ToolStripDropDownItem.cs
- LocalBuilder.cs
- ObjectDataSourceEventArgs.cs
- NetStream.cs
- Polyline.cs
- TextElement.cs
- WebBrowserContainer.cs
- PropertyGeneratedEventArgs.cs
- TreeNodeMouseHoverEvent.cs
- DownloadProgressEventArgs.cs
- UInt16Storage.cs
- HwndKeyboardInputProvider.cs
- EventLogPermission.cs
- Container.cs