Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- RoutedCommand.cs
- DefaultTextStore.cs
- CurrencyManager.cs
- RadioButtonDesigner.cs
- GACMembershipCondition.cs
- ParameterReplacerVisitor.cs
- PauseStoryboard.cs
- HttpsChannelListener.cs
- MatrixCamera.cs
- EventBuilder.cs
- BasicCellRelation.cs
- UniqueConstraint.cs
- ProcessModuleCollection.cs
- ListBoxItem.cs
- BooleanKeyFrameCollection.cs
- HttpModulesSection.cs
- QueryAsyncResult.cs
- dsa.cs
- iisPickupDirectory.cs
- SQLGuid.cs
- SkipStoryboardToFill.cs
- SqlDataSourceEnumerator.cs
- Wow64ConfigurationLoader.cs
- GACMembershipCondition.cs
- DesignDataSource.cs
- AttachedPropertyBrowsableAttribute.cs
- FamilyMapCollection.cs
- NegotiationTokenAuthenticator.cs
- CategoryAttribute.cs
- XmlSchemaInclude.cs
- ImportCatalogPart.cs
- UniqueConstraint.cs
- CompilationLock.cs
- RootBrowserWindow.cs
- DbParameterCollectionHelper.cs
- BuilderPropertyEntry.cs
- ClientSponsor.cs
- TextElementCollection.cs
- ProgressPage.cs
- SettingsAttributes.cs
- ValidateNames.cs
- WebProxyScriptElement.cs
- WebEventCodes.cs
- ArraySortHelper.cs
- SelectionProviderWrapper.cs
- WebRequestModulesSection.cs
- HandleRef.cs
- ActivationArguments.cs
- BufferedWebEventProvider.cs
- FormsIdentity.cs
- NumericExpr.cs
- Viewport3DAutomationPeer.cs
- StdValidatorsAndConverters.cs
- RelatedView.cs
- FixedSOMTable.cs
- OpCellTreeNode.cs
- metrodevice.cs
- SoapEnumAttribute.cs
- EventSetterHandlerConverter.cs
- SynchronizationHandlesCodeDomSerializer.cs
- BinaryMethodMessage.cs
- CultureInfoConverter.cs
- ManagementInstaller.cs
- HtmlHistory.cs
- RemotingConfiguration.cs
- SelectionManager.cs
- UpDownEvent.cs
- iisPickupDirectory.cs
- ElementHostAutomationPeer.cs
- DataGridViewDesigner.cs
- MessageProperties.cs
- SqlCommandBuilder.cs
- ByteStreamMessage.cs
- MenuItem.cs
- Timeline.cs
- HttpStreamFormatter.cs
- XmlParserContext.cs
- ListViewDataItem.cs
- OleDbMetaDataFactory.cs
- TraceRecords.cs
- FixedSOMSemanticBox.cs
- ToolStripMenuItem.cs
- OrderedDictionary.cs
- KeyInstance.cs
- WebPartAddingEventArgs.cs
- DataGridItem.cs
- Int32CollectionConverter.cs
- HtmlTable.cs
- MobileControlPersister.cs
- SoapFault.cs
- WaitHandleCannotBeOpenedException.cs
- HtmlControlPersistable.cs
- GeometryCollection.cs
- InheritanceAttribute.cs
- CodeNamespace.cs
- SubclassTypeValidator.cs
- NumberFunctions.cs
- Lock.cs
- LinkButton.cs
- DataListItemEventArgs.cs