Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Core / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ConfigurationSection.cs
- KnownTypesHelper.cs
- RegexRunner.cs
- DisableDpiAwarenessAttribute.cs
- WebPartTracker.cs
- CompilerGlobalScopeAttribute.cs
- ICollection.cs
- PathStreamGeometryContext.cs
- UnknownBitmapDecoder.cs
- DesignerContextDescriptor.cs
- HostElement.cs
- ObjectSecurity.cs
- VirtualPathUtility.cs
- RectangleConverter.cs
- TimeSpanMinutesOrInfiniteConverter.cs
- HotSpotCollectionEditor.cs
- OptionUsage.cs
- FlowDocumentPage.cs
- SqlFunctionAttribute.cs
- TypeHelper.cs
- ListItemParagraph.cs
- NameGenerator.cs
- CodeCompiler.cs
- ApplyImportsAction.cs
- ArgumentNullException.cs
- ObjectParameterCollection.cs
- ConfigurationManagerHelperFactory.cs
- AppDomainUnloadedException.cs
- Delay.cs
- DbParameterCollection.cs
- _IPv4Address.cs
- DirectionalLight.cs
- XmlKeywords.cs
- InternalConfigRoot.cs
- EmbeddedMailObject.cs
- UrlMappingsSection.cs
- xmlformatgeneratorstatics.cs
- EntityDataSourceStatementEditorForm.cs
- DictionaryItemsCollection.cs
- WsdlBuildProvider.cs
- Geometry3D.cs
- Attribute.cs
- ContractListAdapter.cs
- BlockCollection.cs
- DiffuseMaterial.cs
- MembershipSection.cs
- ModuleBuilder.cs
- DateTimeUtil.cs
- ArithmeticException.cs
- CrossSiteScriptingValidation.cs
- ProviderConnectionPoint.cs
- IntSecurity.cs
- BrushMappingModeValidation.cs
- Mappings.cs
- BindMarkupExtensionSerializer.cs
- TextParaClient.cs
- InputReport.cs
- CmsInterop.cs
- LongSumAggregationOperator.cs
- XmlAttributes.cs
- SourceFileBuildProvider.cs
- PathParser.cs
- CodeTypeDelegate.cs
- DoWorkEventArgs.cs
- FileUtil.cs
- RepeatBehaviorConverter.cs
- RawUIStateInputReport.cs
- UnsafeMethods.cs
- ConfigurationElementCollection.cs
- ClientEventManager.cs
- LayoutExceptionEventArgs.cs
- AlignmentYValidation.cs
- SafeTimerHandle.cs
- PrintPreviewDialog.cs
- RtfToken.cs
- DocumentScope.cs
- LiteralControl.cs
- TextDecorationCollection.cs
- ToolboxComponentsCreatingEventArgs.cs
- TypeForwardedFromAttribute.cs
- DictionarySectionHandler.cs
- EventOpcode.cs
- HTMLTagNameToTypeMapper.cs
- StorageConditionPropertyMapping.cs
- TextServicesCompartmentContext.cs
- AsyncMethodInvoker.cs
- HtmlElementEventArgs.cs
- XamlPointCollectionSerializer.cs
- StylusPointProperty.cs
- Translator.cs
- XmlSchemaParticle.cs
- GeneralTransform3D.cs
- ReadWriteObjectLock.cs
- RawKeyboardInputReport.cs
- CommonProperties.cs
- ConnectionPoint.cs
- ExpressionBuilderContext.cs
- AccessControlList.cs
- CommandSet.cs
- Stack.cs