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
- CatalogZone.cs
- BaseDataList.cs
- DateTimeConstantAttribute.cs
- WsdlExporter.cs
- DataBoundControlAdapter.cs
- RadioButtonRenderer.cs
- JoinSymbol.cs
- OleStrCAMarshaler.cs
- Model3DCollection.cs
- XmlDownloadManager.cs
- EpmSyndicationContentSerializer.cs
- SystemIPv4InterfaceProperties.cs
- TextSerializer.cs
- DefaultPropertyAttribute.cs
- HandlerFactoryCache.cs
- TableCellCollection.cs
- xmlglyphRunInfo.cs
- SelectionChangedEventArgs.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- QueryContinueDragEventArgs.cs
- DataRowView.cs
- CodeNamespaceCollection.cs
- TriState.cs
- OdbcDataReader.cs
- BitFlagsGenerator.cs
- MediaContext.cs
- ExtendLockAsyncResult.cs
- ViewManagerAttribute.cs
- WorkflowValidationFailedException.cs
- DesignerRegionMouseEventArgs.cs
- LabelLiteral.cs
- srgsitem.cs
- TaskFormBase.cs
- ConfigurationManagerHelper.cs
- JsonReaderWriterFactory.cs
- RootBrowserWindowAutomationPeer.cs
- StrokeNode.cs
- RunClient.cs
- CompensationHandlingFilter.cs
- XmlReturnWriter.cs
- GcSettings.cs
- StateDesigner.cs
- PathSegment.cs
- ScrollBar.cs
- GenerateHelper.cs
- ClosableStream.cs
- MeasurementDCInfo.cs
- RuleCache.cs
- DictionaryChange.cs
- JapaneseCalendar.cs
- GreaterThan.cs
- SqlGenerator.cs
- _HTTPDateParse.cs
- ZipIORawDataFileBlock.cs
- TransportDefaults.cs
- MiniParameterInfo.cs
- ContextActivityUtils.cs
- DocumentPageViewAutomationPeer.cs
- DataGridDefaultColumnWidthTypeConverter.cs
- SingleStorage.cs
- BindUriHelper.cs
- MenuCommands.cs
- ServiceObjectContainer.cs
- SessionEndedEventArgs.cs
- StateItem.cs
- UnsafeNativeMethods.cs
- ExtenderControl.cs
- X500Name.cs
- CollectionConverter.cs
- GeneralTransformCollection.cs
- ConfigurationValidatorAttribute.cs
- UnsafeNativeMethods.cs
- PTProvider.cs
- HtmlInputReset.cs
- XPathNodePointer.cs
- InstanceLockQueryResult.cs
- TypeReference.cs
- VarRemapper.cs
- DropShadowEffect.cs
- ModelPerspective.cs
- WpfKnownType.cs
- XmlSchemaCompilationSettings.cs
- OleServicesContext.cs
- RegexMatchCollection.cs
- NativeActivityMetadata.cs
- SecurityContext.cs
- DBSchemaTable.cs
- DataBoundControlHelper.cs
- TypeConverterAttribute.cs
- WebPartRestoreVerb.cs
- SplitContainer.cs
- SystemResourceKey.cs
- ArgIterator.cs
- processwaithandle.cs
- WindowsRebar.cs
- HtmlWindow.cs
- MultiPropertyDescriptorGridEntry.cs
- FocusChangedEventArgs.cs
- DataControlLinkButton.cs
- ConfigurationLockCollection.cs