CalendarSelectionChangedEventArgs.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ 4.0 / 4.0 / untmp / 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.


                        

Link Menu

Network programming in C#, Network Programming in VB.NET, Network Programming in .NET
This book is available now!
Buy at Amazon US or
Buy at Amazon UK