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
- X509Utils.cs
- ColumnPropertiesGroup.cs
- XmlConvert.cs
- AliasGenerator.cs
- CodeObjectCreateExpression.cs
- SqlDataRecord.cs
- MissingSatelliteAssemblyException.cs
- RefreshPropertiesAttribute.cs
- ObfuscationAttribute.cs
- UriWriter.cs
- LicFileLicenseProvider.cs
- DataGridViewCellStyleChangedEventArgs.cs
- util.cs
- WCFBuildProvider.cs
- DataList.cs
- WebPartPersonalization.cs
- ContactManager.cs
- DelegatedStream.cs
- JsonSerializer.cs
- OperationFormatUse.cs
- NotificationContext.cs
- X509WindowsSecurityToken.cs
- WebPartTransformerAttribute.cs
- StyleSheetComponentEditor.cs
- ContainerUIElement3D.cs
- WorkflowTraceTransfer.cs
- TextRangeProviderWrapper.cs
- RemoteCryptoDecryptRequest.cs
- GridViewCommandEventArgs.cs
- ColumnHeaderConverter.cs
- CodePrimitiveExpression.cs
- UnionCodeGroup.cs
- PrimitiveCodeDomSerializer.cs
- GridItemPattern.cs
- HashAlgorithm.cs
- MailMessageEventArgs.cs
- mansign.cs
- ByteRangeDownloader.cs
- WebEvents.cs
- LayoutSettings.cs
- WindowsServiceCredential.cs
- InvalidOleVariantTypeException.cs
- ColumnWidthChangingEvent.cs
- HttpInputStream.cs
- ColorTransform.cs
- rsa.cs
- CallbackWrapper.cs
- SettingsPropertyNotFoundException.cs
- EntityKeyElement.cs
- AutomationPattern.cs
- SelectionPattern.cs
- SelectionPatternIdentifiers.cs
- Polyline.cs
- SerializableReadOnlyDictionary.cs
- ThreadAttributes.cs
- TextTreeUndo.cs
- HealthMonitoringSection.cs
- ListViewSelectEventArgs.cs
- SubstitutionResponseElement.cs
- FormViewUpdateEventArgs.cs
- SynchronizedDispatch.cs
- WorkflowRuntimeSection.cs
- ServicePointManager.cs
- OlePropertyStructs.cs
- ProfileEventArgs.cs
- URLAttribute.cs
- TdsParserSessionPool.cs
- ProxyGenerationError.cs
- StyleHelper.cs
- BitmapEffectInputData.cs
- WebPartTracker.cs
- BaseTemplateParser.cs
- XmlSignatureManifest.cs
- StylusEditingBehavior.cs
- TableCellCollection.cs
- TypeResolver.cs
- RijndaelManagedTransform.cs
- NominalTypeEliminator.cs
- UpdateExpressionVisitor.cs
- HttpPostProtocolImporter.cs
- BinaryNegotiation.cs
- XmlHierarchicalEnumerable.cs
- ManagementObjectSearcher.cs
- ShaderEffect.cs
- DataGridViewSortCompareEventArgs.cs
- SendMailErrorEventArgs.cs
- GridViewSelectEventArgs.cs
- HybridCollection.cs
- QilCloneVisitor.cs
- Comparer.cs
- webclient.cs
- MouseOverProperty.cs
- ResourcesBuildProvider.cs
- EmbeddedMailObjectsCollection.cs
- DocumentViewerConstants.cs
- NameValueSectionHandler.cs
- SystemInformation.cs
- TransformValueSerializer.cs
- DateTimeUtil.cs
- PerformanceCounterManager.cs