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) { EventHandlerhandler = 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) { EventHandlerhandler = 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
- ExitEventArgs.cs
- TextServicesLoader.cs
- EntityStoreSchemaGenerator.cs
- SubpageParagraph.cs
- DeferredElementTreeState.cs
- SendActivityDesignerTheme.cs
- DecimalKeyFrameCollection.cs
- FixedPage.cs
- AssociationEndMember.cs
- XmlSiteMapProvider.cs
- CatalogPart.cs
- ObjectDataSourceMethodEventArgs.cs
- OutputCacheModule.cs
- LocalizableResourceBuilder.cs
- TraceUtils.cs
- DynamicHyperLink.cs
- LinqDataSourceView.cs
- InstanceNormalEvent.cs
- SmtpReplyReader.cs
- SvcMapFileLoader.cs
- SchemaInfo.cs
- DtdParser.cs
- TemplateField.cs
- ZipPackage.cs
- ConfigsHelper.cs
- XPathDocumentIterator.cs
- DBSqlParser.cs
- TextBoxBase.cs
- PlanCompiler.cs
- ObjectHandle.cs
- DefaultValueTypeConverter.cs
- ElapsedEventArgs.cs
- DockProviderWrapper.cs
- StringPropertyBuilder.cs
- ListViewSortEventArgs.cs
- ExpressionLexer.cs
- QilLiteral.cs
- WorkflowRuntimeService.cs
- AbandonedMutexException.cs
- OneOfConst.cs
- ReflectionUtil.cs
- GridViewCellAutomationPeer.cs
- ProvidersHelper.cs
- BamlRecordHelper.cs
- MinMaxParagraphWidth.cs
- IdentityManager.cs
- XmlMembersMapping.cs
- ListViewSelectEventArgs.cs
- LogSwitch.cs
- PreservationFileWriter.cs
- MultiPropertyDescriptorGridEntry.cs
- ImageSourceConverter.cs
- WCFBuildProvider.cs
- ScriptResourceMapping.cs
- TableLayoutPanelCellPosition.cs
- TableAutomationPeer.cs
- SerializationStore.cs
- PackWebRequestFactory.cs
- ImageCodecInfoPrivate.cs
- ByteStack.cs
- SkinBuilder.cs
- ImageDrawing.cs
- ClientBuildManager.cs
- InputLanguageEventArgs.cs
- ContextTokenTypeConverter.cs
- ContentValidator.cs
- XmlNamespaceMappingCollection.cs
- BamlLocalizableResourceKey.cs
- ClientSettingsSection.cs
- Calendar.cs
- DBSqlParserTable.cs
- ByValueEqualityComparer.cs
- DispatcherOperation.cs
- OleDbReferenceCollection.cs
- RMPublishingDialog.cs
- ZipQueryOperator.cs
- MasterPageCodeDomTreeGenerator.cs
- InstanceDataCollectionCollection.cs
- BuildProvider.cs
- FacetEnabledSchemaElement.cs
- SqlDataSourceFilteringEventArgs.cs
- NullableDoubleAverageAggregationOperator.cs
- _SslState.cs
- PropertyInfoSet.cs
- IsolatedStoragePermission.cs
- _NestedSingleAsyncResult.cs
- DataGridItemCollection.cs
- HtmlFormWrapper.cs
- AccessKeyManager.cs
- ExpressionWriter.cs
- XXXInfos.cs
- DebugViewWriter.cs
- ComponentCommands.cs
- AmbientProperties.cs
- OpenCollectionAsyncResult.cs
- ConfigXmlWhitespace.cs
- CodeExporter.cs
- SkinBuilder.cs
- FileLevelControlBuilderAttribute.cs
- StrongNameUtility.cs