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
- CompoundFileIOPermission.cs
- CodeChecksumPragma.cs
- COM2PictureConverter.cs
- TextBoxBase.cs
- HelpProvider.cs
- ContentPresenter.cs
- VideoDrawing.cs
- RegionData.cs
- LongTypeConverter.cs
- SchemaInfo.cs
- ClientBuildManager.cs
- XmlSchemaSimpleContentExtension.cs
- KeyValuePair.cs
- StorageFunctionMapping.cs
- ActivityTypeDesigner.xaml.cs
- CompositeFontFamily.cs
- TextAdaptor.cs
- CrossContextChannel.cs
- EventWaitHandleSecurity.cs
- ScriptReferenceBase.cs
- CommonRemoteMemoryBlock.cs
- TextWriterTraceListener.cs
- NativeActivity.cs
- WSSecurityOneDotZeroSendSecurityHeader.cs
- DataGridViewIntLinkedList.cs
- ListViewCommandEventArgs.cs
- Column.cs
- GeneralTransform3DTo2DTo3D.cs
- SessionPageStatePersister.cs
- Point4DValueSerializer.cs
- SystemResources.cs
- ResumeStoryboard.cs
- SqlCachedBuffer.cs
- DeflateEmulationStream.cs
- FileResponseElement.cs
- AutomationPropertyInfo.cs
- SoapTypeAttribute.cs
- DelegatingTypeDescriptionProvider.cs
- FlowNode.cs
- WebBrowserHelper.cs
- Calendar.cs
- DependencyPropertyKey.cs
- __FastResourceComparer.cs
- WpfPayload.cs
- SQLStringStorage.cs
- RegexGroup.cs
- ProcessRequestAsyncResult.cs
- DateTimeSerializationSection.cs
- PipelineModuleStepContainer.cs
- FormViewActionList.cs
- SqlVisitor.cs
- DashStyle.cs
- ErrorStyle.cs
- IntPtr.cs
- MatrixIndependentAnimationStorage.cs
- DbDataReader.cs
- SimpleWorkerRequest.cs
- SerializationAttributes.cs
- InfoCardRSAOAEPKeyExchangeDeformatter.cs
- PowerModeChangedEventArgs.cs
- SqlDataSourceEnumerator.cs
- ValidateNames.cs
- ActiveDesignSurfaceEvent.cs
- BaseProcessor.cs
- StructuredCompositeActivityDesigner.cs
- XmlAttributeCollection.cs
- HttpRequestCacheValidator.cs
- DesignTableCollection.cs
- PageSetupDialog.cs
- comcontractssection.cs
- OdbcConnectionPoolProviderInfo.cs
- WebRequestModuleElement.cs
- SizeLimitedCache.cs
- PropertyGridEditorPart.cs
- DataControlLinkButton.cs
- ObjectCache.cs
- XpsResourcePolicy.cs
- XmlLanguage.cs
- GPStream.cs
- XmlSchemaComplexContentExtension.cs
- Style.cs
- DefaultValueAttribute.cs
- XpsFilter.cs
- WebEncodingValidator.cs
- ISAPIRuntime.cs
- PerformanceCounterTraceRecord.cs
- FontSource.cs
- RawStylusInput.cs
- UnsafeNativeMethodsTablet.cs
- RemotingConfigParser.cs
- MenuItemStyle.cs
- WpfPayload.cs
- GPRECTF.cs
- ServicePoint.cs
- StringSorter.cs
- RegexWorker.cs
- WindowsScroll.cs
- DataBindingCollectionEditor.cs
- UpdateEventArgs.cs
- PositiveTimeSpanValidator.cs