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
- RadioButton.cs
- PatternMatcher.cs
- DetailsViewPagerRow.cs
- RuntimeConfig.cs
- StatusBarItemAutomationPeer.cs
- FrameAutomationPeer.cs
- SecurityManager.cs
- WebBrowsableAttribute.cs
- MasterPageBuildProvider.cs
- EdmItemError.cs
- ScrollBarRenderer.cs
- HostedNamedPipeTransportManager.cs
- BufferModeSettings.cs
- RenderingEventArgs.cs
- SettingsPropertyCollection.cs
- SnapshotChangeTrackingStrategy.cs
- NamespaceImport.cs
- MenuItemStyleCollection.cs
- StatusBarItemAutomationPeer.cs
- LocalIdCollection.cs
- ApplySecurityAndSendAsyncResult.cs
- MediaElement.cs
- TaskFormBase.cs
- DependencyPropertyKey.cs
- Policy.cs
- SqlRemoveConstantOrderBy.cs
- FlowLayoutPanel.cs
- HighlightVisual.cs
- SubstitutionList.cs
- PagerSettings.cs
- StrongNameSignatureInformation.cs
- TargetParameterCountException.cs
- XMLDiffLoader.cs
- UDPClient.cs
- AddInPipelineAttributes.cs
- MailBnfHelper.cs
- MarshalDirectiveException.cs
- FixedSOMLineCollection.cs
- WrapPanel.cs
- OdbcCommand.cs
- AccessorTable.cs
- BitStream.cs
- InlineUIContainer.cs
- StreamResourceInfo.cs
- KeyTimeConverter.cs
- Privilege.cs
- HierarchicalDataBoundControlAdapter.cs
- AppModelKnownContentFactory.cs
- _SSPISessionCache.cs
- EntityDataSourceStatementEditor.cs
- BaseCodePageEncoding.cs
- Light.cs
- XmlLoader.cs
- ParallelForEach.cs
- ReleaseInstanceMode.cs
- TraceLog.cs
- CollectionViewGroupInternal.cs
- SizeKeyFrameCollection.cs
- XmlSchema.cs
- DiscoveryDocumentLinksPattern.cs
- DESCryptoServiceProvider.cs
- SourceInterpreter.cs
- FlowLayoutSettings.cs
- FindSimilarActivitiesVerb.cs
- ChtmlTextWriter.cs
- Point.cs
- AndCondition.cs
- FieldNameLookup.cs
- ConnectionManagementSection.cs
- X509LogoTypeExtension.cs
- JsonReader.cs
- LambdaCompiler.Lambda.cs
- AnyAllSearchOperator.cs
- SQLByte.cs
- AsmxEndpointPickerExtension.cs
- SparseMemoryStream.cs
- _NtlmClient.cs
- SQLChars.cs
- Propagator.cs
- WebColorConverter.cs
- LinqDataSourceValidationException.cs
- DocumentGrid.cs
- CharacterShapingProperties.cs
- Faults.cs
- MD5HashHelper.cs
- GridEntry.cs
- VarRefManager.cs
- xamlnodes.cs
- MethodImplAttribute.cs
- ExplicitDiscriminatorMap.cs
- MailSettingsSection.cs
- InstanceHandleConflictException.cs
- AudioFileOut.cs
- AssemblyUtil.cs
- FormViewModeEventArgs.cs
- FieldMetadata.cs
- MultilineStringConverter.cs
- Cursors.cs
- SmiEventSink_DeferedProcessing.cs
- PerformanceCountersElement.cs