Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / Controls / CalendarSelectionChangedEventArgs.cs / 1305600 / CalendarSelectionChangedEventArgs.cs
//----------------------------------------------------------------------------
//
// Copyright (C) Microsoft Corporation. All rights reserved.
//
//---------------------------------------------------------------------------
using System;
using System.Collections;
using System.Collections.Generic;
using System.Windows;
namespace System.Windows.Controls
{
///
/// Workaround for Dev10 Bug 527138 UIElement.RaiseEvent(e) throws InvalidCastException when
/// e is of type SelectionChangedEventArgs
/// e.RoutedEvent was registered with a handler not of type System.Windows.Controls.SelectionChangedEventHandler
///
internal class CalendarSelectionChangedEventArgs : SelectionChangedEventArgs
{
///
/// Constructor
///
/// Routed Event
/// Items removed from selection
/// Items added to selection
public CalendarSelectionChangedEventArgs(RoutedEvent eventId, IList removedItems, IList addedItems) :
base(eventId, removedItems, addedItems)
{
}
protected override void InvokeEventHandler(Delegate genericHandler, object genericTarget)
{
EventHandler handler = genericHandler as EventHandler;
if (handler != null)
{
handler(genericTarget, this);
}
else
{
base.InvokeEventHandler(genericHandler, genericTarget);
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
//----------------------------------------------------------------------------
//
// Copyright (C) Microsoft Corporation. All rights reserved.
//
//---------------------------------------------------------------------------
using System;
using System.Collections;
using System.Collections.Generic;
using System.Windows;
namespace System.Windows.Controls
{
///
/// Workaround for Dev10 Bug 527138 UIElement.RaiseEvent(e) throws InvalidCastException when
/// e is of type SelectionChangedEventArgs
/// e.RoutedEvent was registered with a handler not of type System.Windows.Controls.SelectionChangedEventHandler
///
internal class CalendarSelectionChangedEventArgs : SelectionChangedEventArgs
{
///
/// Constructor
///
/// Routed Event
/// Items removed from selection
/// Items added to selection
public CalendarSelectionChangedEventArgs(RoutedEvent eventId, IList removedItems, IList addedItems) :
base(eventId, removedItems, addedItems)
{
}
protected override void InvokeEventHandler(Delegate genericHandler, object genericTarget)
{
EventHandler handler = genericHandler as EventHandler;
if (handler != null)
{
handler(genericTarget, this);
}
else
{
base.InvokeEventHandler(genericHandler, genericTarget);
}
}
}
}
// 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
- IdentityManager.cs
- TextRunCache.cs
- DocumentCollection.cs
- TemplateColumn.cs
- Viewport3DAutomationPeer.cs
- RuntimeIdentifierPropertyAttribute.cs
- DynamicValidator.cs
- ModelUtilities.cs
- ItemsPresenter.cs
- UICuesEvent.cs
- ListItemCollection.cs
- VBIdentifierName.cs
- EllipseGeometry.cs
- IndexedGlyphRun.cs
- SystemTcpConnection.cs
- SoapElementAttribute.cs
- Light.cs
- StateWorkerRequest.cs
- UTF32Encoding.cs
- DataGridViewTextBoxCell.cs
- SamlAuthorizationDecisionClaimResource.cs
- ObjectFactoryCodeDomTreeGenerator.cs
- WmpBitmapEncoder.cs
- QilName.cs
- GB18030Encoding.cs
- WebCategoryAttribute.cs
- OrCondition.cs
- CultureInfo.cs
- ConfigurationManagerHelper.cs
- XmlUrlResolver.cs
- UserPreferenceChangedEventArgs.cs
- DefaultValidator.cs
- PrintDialogException.cs
- SiteMapProvider.cs
- ListBoxItem.cs
- CRYPTPROTECT_PROMPTSTRUCT.cs
- FormViewPagerRow.cs
- CredentialCache.cs
- ScriptRef.cs
- UniqueIdentifierService.cs
- AsynchronousChannelMergeEnumerator.cs
- SQLMoneyStorage.cs
- RoutedEventHandlerInfo.cs
- DataSetUtil.cs
- ParameterElementCollection.cs
- TrackBar.cs
- ConfigurationValidatorAttribute.cs
- StatusBarPanelClickEvent.cs
- ValueTable.cs
- SafeFreeMibTable.cs
- ButtonAutomationPeer.cs
- ValidationErrorCollection.cs
- ButtonChrome.cs
- CodeCompileUnit.cs
- Tuple.cs
- HwndHost.cs
- BinaryObjectInfo.cs
- DiscriminatorMap.cs
- Misc.cs
- GlyphRun.cs
- DesignerContextDescriptor.cs
- _ShellExpression.cs
- ResourceWriter.cs
- RuntimeHandles.cs
- ComEventsHelper.cs
- GcSettings.cs
- Ref.cs
- ParenExpr.cs
- SiteMapNode.cs
- OrderByBuilder.cs
- TypeExtension.cs
- GridViewCancelEditEventArgs.cs
- LinkButton.cs
- Keywords.cs
- RestHandlerFactory.cs
- regiisutil.cs
- Graphics.cs
- UriScheme.cs
- EntityViewContainer.cs
- ExpressionList.cs
- Transaction.cs
- OdbcEnvironmentHandle.cs
- BitmapDecoder.cs
- InvokePatternIdentifiers.cs
- _UncName.cs
- MouseWheelEventArgs.cs
- XPathNodePointer.cs
- OleDragDropHandler.cs
- QueuePathEditor.cs
- x509store.cs
- StreamSecurityUpgradeProvider.cs
- ListBoxItem.cs
- BasePropertyDescriptor.cs
- InstanceData.cs
- CodeAccessSecurityEngine.cs
- RegexEditorDialog.cs
- GeometryHitTestParameters.cs
- TaskFileService.cs
- shaper.cs
- CopyAction.cs