Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- PartBasedPackageProperties.cs
- GZipDecoder.cs
- HttpInputStream.cs
- MultiBinding.cs
- TemplateFactory.cs
- HtmlEncodedRawTextWriter.cs
- IntSecurity.cs
- CopyAttributesAction.cs
- ToolBarButton.cs
- GenerateTemporaryTargetAssembly.cs
- ZipPackage.cs
- Int32CAMarshaler.cs
- CryptoHelper.cs
- HyperLinkStyle.cs
- DropTarget.cs
- WindowsAuthenticationModule.cs
- SolidBrush.cs
- AuthenticodeSignatureInformation.cs
- Marshal.cs
- PointCollection.cs
- DoubleMinMaxAggregationOperator.cs
- DeclarativeConditionsCollection.cs
- StringUtil.cs
- SslStreamSecurityUpgradeProvider.cs
- SchemaNames.cs
- Material.cs
- StringConcat.cs
- StatusBarItemAutomationPeer.cs
- SchemaNamespaceManager.cs
- CqlGenerator.cs
- CodeCompiler.cs
- ComboBox.cs
- MainMenu.cs
- SqlLiftIndependentRowExpressions.cs
- FolderLevelBuildProvider.cs
- IIS7UserPrincipal.cs
- Group.cs
- uribuilder.cs
- ImageCollectionCodeDomSerializer.cs
- PackUriHelper.cs
- SvcMapFile.cs
- EncoderExceptionFallback.cs
- ExtensibleClassFactory.cs
- XamlReaderHelper.cs
- RemoteWebConfigurationHost.cs
- VirtualPath.cs
- TrustManager.cs
- XmlHelper.cs
- XPathAncestorIterator.cs
- SelectionProviderWrapper.cs
- WorkflowOperationAsyncResult.cs
- ExecutionScope.cs
- Source.cs
- ColumnResizeAdorner.cs
- FontFamily.cs
- ParamArrayAttribute.cs
- InkCanvasAutomationPeer.cs
- DateTimePicker.cs
- RowCache.cs
- TdsValueSetter.cs
- XamlClipboardData.cs
- HotSpotCollection.cs
- MediaSystem.cs
- RepeaterItemCollection.cs
- BooleanConverter.cs
- GroupStyle.cs
- IItemContainerGenerator.cs
- ConnectionStringSettings.cs
- XamlPathDataSerializer.cs
- EditableRegion.cs
- XmlObjectSerializerWriteContext.cs
- ScrollBarRenderer.cs
- _AuthenticationState.cs
- DataGridViewTextBoxCell.cs
- SqlConnection.cs
- SerializationEventsCache.cs
- Panel.cs
- ProtectedConfigurationSection.cs
- SignatureTargetIdManager.cs
- BitStream.cs
- ThreadExceptionDialog.cs
- ObjectNotFoundException.cs
- __FastResourceComparer.cs
- PartDesigner.cs
- OletxResourceManager.cs
- XmlTextReaderImpl.cs
- ScriptResourceHandler.cs
- newinstructionaction.cs
- SqlNode.cs
- ActiveXHelper.cs
- HttpRequestBase.cs
- Peer.cs
- TypeReference.cs
- RemoveStoryboard.cs
- Regex.cs
- LineUtil.cs
- WorkflowFileItem.cs
- XmlNullResolver.cs
- XsdBuilder.cs
- XmlSerializerVersionAttribute.cs