Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / Controls / SelectionChangedEventArgs.cs / 1305600 / SelectionChangedEventArgs.cs
using System.ComponentModel; using System.Collections; using System.Collections.Generic; using System.Windows.Threading; using System.Windows.Data; using System.Windows.Automation; using System.Windows.Automation.Provider; using MS.Utility; using System.Windows; using System; using System.Diagnostics; namespace System.Windows.Controls { ////// The delegate type for handling a selection changed event /// public delegate void SelectionChangedEventHandler( object sender, SelectionChangedEventArgs e); ////// The inputs to a selection changed event handler /// public class SelectionChangedEventArgs : RoutedEventArgs { #region Constructors ////// The constructor for selection changed args /// /// The event ID for the event about to fire -- should probably be Selector.SelectionChangedEvent /// The items that were unselected during this event /// The items that were selected during this event public SelectionChangedEventArgs( RoutedEvent id, IList removedItems, IList addedItems) { if (id == null) throw new ArgumentNullException("id"); if (removedItems == null) throw new ArgumentNullException("removedItems"); if (addedItems == null) throw new ArgumentNullException("addedItems"); RoutedEvent = id; _removedItems = new object[removedItems.Count]; removedItems.CopyTo(_removedItems, 0); _addedItems = new object[addedItems.Count]; addedItems.CopyTo(_addedItems, 0); } internal SelectionChangedEventArgs(IList removedItems, IList addedItems) : this(System.Windows.Controls.Primitives.Selector.SelectionChangedEvent, removedItems, addedItems) { } #endregion #region Public Properties ////// An IList containing the items that were unselected during this event /// public IList RemovedItems { get { return _removedItems; } } ////// An IList containing the items that were selected during this event /// public IList AddedItems { get { return _addedItems; } } #endregion #region Protected Methods ////// This method is used to perform the proper type casting in order to /// call the type-safe SelectionChangedEventHandler delegate for the SelectionChangedEvent event. /// /// The handler to invoke. /// The current object along the event's route. protected override void InvokeEventHandler(Delegate genericHandler, object genericTarget) { SelectionChangedEventHandler handler = (SelectionChangedEventHandler)genericHandler; handler(genericTarget, this); } #endregion #region Data private object[] _addedItems; private object[] _removedItems; #endregion } } // 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
- BitmapCacheBrush.cs
- WebBrowserSiteBase.cs
- NumberFunctions.cs
- XPathAncestorIterator.cs
- ObjectSecurity.cs
- COSERVERINFO.cs
- DbSource.cs
- XmlSerializationGeneratedCode.cs
- webclient.cs
- TrackingRecordPreFilter.cs
- HtmlUtf8RawTextWriter.cs
- GC.cs
- EncoderParameter.cs
- StretchValidation.cs
- CompareInfo.cs
- MessageDescriptionCollection.cs
- DataServiceRequestException.cs
- XPathSingletonIterator.cs
- AuthenticationServiceManager.cs
- ListBoxItemWrapperAutomationPeer.cs
- ProcessHost.cs
- ListViewUpdatedEventArgs.cs
- ResourceManagerWrapper.cs
- UInt16.cs
- OleDbDataReader.cs
- PopupRootAutomationPeer.cs
- newinstructionaction.cs
- HwndMouseInputProvider.cs
- _Rfc2616CacheValidators.cs
- ChannelProtectionRequirements.cs
- TablePatternIdentifiers.cs
- ButtonBaseAdapter.cs
- XmlQueryType.cs
- CultureInfoConverter.cs
- FixedNode.cs
- XsltLibrary.cs
- ViewRendering.cs
- ActionItem.cs
- SendSecurityHeaderElement.cs
- HtmlToClrEventProxy.cs
- GeometryValueSerializer.cs
- DurableOperationContext.cs
- CodeMemberField.cs
- WinInet.cs
- ConsoleEntryPoint.cs
- SevenBitStream.cs
- CodeThrowExceptionStatement.cs
- PreservationFileReader.cs
- DataGridViewIntLinkedList.cs
- SmiContext.cs
- ListViewItemSelectionChangedEvent.cs
- ProtocolsSection.cs
- CultureInfoConverter.cs
- DescendantBaseQuery.cs
- MsmqInputMessage.cs
- DataGridViewComboBoxEditingControl.cs
- ParallelQuery.cs
- BamlTreeUpdater.cs
- HtmlString.cs
- ExpressionVisitor.cs
- PartialCachingAttribute.cs
- SerializationException.cs
- ServerValidateEventArgs.cs
- PathGradientBrush.cs
- StrokeNode.cs
- RuleCache.cs
- DbConnectionOptions.cs
- DES.cs
- CustomDictionarySources.cs
- FreezableCollection.cs
- FileLoadException.cs
- baseaxisquery.cs
- DesignerAutoFormat.cs
- ContextMenuService.cs
- ResourceDescriptionAttribute.cs
- BitmapEffectDrawing.cs
- BufferModesCollection.cs
- DataListGeneralPage.cs
- Wizard.cs
- MenuAutomationPeer.cs
- MessageQueueException.cs
- DataGridViewAutoSizeColumnModeEventArgs.cs
- ReaderContextStackData.cs
- ImageField.cs
- FileVersionInfo.cs
- RectangleHotSpot.cs
- EventLogPermissionEntryCollection.cs
- ActiveXContainer.cs
- FileStream.cs
- XmlAttributeHolder.cs
- CultureSpecificStringDictionary.cs
- DataGridItemCollection.cs
- FixUp.cs
- BoundField.cs
- XslException.cs
- HandledMouseEvent.cs
- DoubleStorage.cs
- UriTemplateVariablePathSegment.cs
- SiteMapDataSource.cs
- BindingMAnagerBase.cs