Code:
/ 4.0 / 4.0 / 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. 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
- MenuScrollingVisibilityConverter.cs
- ISAPIApplicationHost.cs
- remotingproxy.cs
- GeneralTransform3DCollection.cs
- PatternMatcher.cs
- _HeaderInfoTable.cs
- XmlTextReader.cs
- SynchronizedReadOnlyCollection.cs
- MeshGeometry3D.cs
- ImmutableObjectAttribute.cs
- NodeFunctions.cs
- AppDomainShutdownMonitor.cs
- AdjustableArrowCap.cs
- ViewBase.cs
- TargetInvocationException.cs
- Typography.cs
- Baml2006KnownTypes.cs
- AmbiguousMatchException.cs
- TimeSpanMinutesOrInfiniteConverter.cs
- SafeEventHandle.cs
- FreezableCollection.cs
- StylusPointPropertyInfoDefaults.cs
- SerializationAttributes.cs
- Pen.cs
- PostBackOptions.cs
- ADRole.cs
- PanelDesigner.cs
- LinqToSqlWrapper.cs
- AsymmetricSignatureFormatter.cs
- SqlServer2KCompatibilityCheck.cs
- TypeInfo.cs
- XmlReflectionImporter.cs
- EntityDataSourceQueryBuilder.cs
- ConfigXmlWhitespace.cs
- ConfigurationStrings.cs
- SafeCertificateContext.cs
- CoreSwitches.cs
- CoTaskMemHandle.cs
- BindingManagerDataErrorEventArgs.cs
- Point3DAnimation.cs
- AsymmetricSignatureDeformatter.cs
- XmlSchemaValidationException.cs
- BamlLocalizationDictionary.cs
- CustomAttribute.cs
- SoapIncludeAttribute.cs
- ManualResetEvent.cs
- TwoPhaseCommit.cs
- _SecureChannel.cs
- DataService.cs
- DWriteFactory.cs
- DataGridViewCellStyle.cs
- ColumnPropertiesGroup.cs
- WebServiceHost.cs
- PropertyDescriptorComparer.cs
- IndicFontClient.cs
- AuthorizationPolicyTypeElement.cs
- Renderer.cs
- EmptyQuery.cs
- WindowAutomationPeer.cs
- AdjustableArrowCap.cs
- SqlWriter.cs
- XamlWriter.cs
- Grant.cs
- MergePropertyDescriptor.cs
- AddInController.cs
- ListView.cs
- ProxyGenerator.cs
- Resources.Designer.cs
- CompressedStack.cs
- ToolStripSeparatorRenderEventArgs.cs
- UnsettableComboBox.cs
- TypeDescriptionProvider.cs
- HtmlToClrEventProxy.cs
- PointCollectionValueSerializer.cs
- ExpressionBuilderCollection.cs
- SourceInterpreter.cs
- PropertyMapper.cs
- Debug.cs
- DataPagerFieldCollection.cs
- SystemResources.cs
- KeyboardNavigation.cs
- PersonalizationDictionary.cs
- FormParameter.cs
- CollectionsUtil.cs
- TreeView.cs
- UserValidatedEventArgs.cs
- WhitespaceReader.cs
- Config.cs
- StagingAreaInputItem.cs
- XmlDataSourceNodeDescriptor.cs
- WindowsListViewGroupHelper.cs
- ListViewDeleteEventArgs.cs
- CodeDOMProvider.cs
- BitConverter.cs
- BitmapEncoder.cs
- MsmqMessageProperty.cs
- KeyConverter.cs
- SerializationInfo.cs
- FontUnit.cs
- XmlIgnoreAttribute.cs