Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Framework / System / Windows / Controls / SelectionChangedEventArgs.cs / 1 / 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
- XmlAttributeCache.cs
- DragEventArgs.cs
- Tokenizer.cs
- ListViewInsertEventArgs.cs
- SafeBitVector32.cs
- OutOfMemoryException.cs
- SystemException.cs
- PropertyPanel.cs
- SmiXetterAccessMap.cs
- AudioStateChangedEventArgs.cs
- XmlKeywords.cs
- MetadataPropertyAttribute.cs
- Symbol.cs
- Socket.cs
- ApplicationServicesHostFactory.cs
- BaseParser.cs
- WebPartDisplayModeCancelEventArgs.cs
- ClientData.cs
- SqlTypesSchemaImporter.cs
- HandleDictionary.cs
- ChtmlPhoneCallAdapter.cs
- XmlCharCheckingReader.cs
- StandardOleMarshalObject.cs
- InfoCardCryptoHelper.cs
- X509CertificateCollection.cs
- SQLByteStorage.cs
- CqlQuery.cs
- XPathBinder.cs
- FloaterBaseParaClient.cs
- DataObjectCopyingEventArgs.cs
- Stopwatch.cs
- ChangeBlockUndoRecord.cs
- EdmToObjectNamespaceMap.cs
- BoundField.cs
- Effect.cs
- OleDbConnectionInternal.cs
- VarRefManager.cs
- LogoValidationException.cs
- DataTablePropertyDescriptor.cs
- Marshal.cs
- ByteStorage.cs
- UInt32Storage.cs
- AutomationPattern.cs
- OdbcDataReader.cs
- TdsParserHelperClasses.cs
- VisualTreeHelper.cs
- DefaultEvaluationContext.cs
- BitmapImage.cs
- Schema.cs
- RouteData.cs
- MetaModel.cs
- ApplicationServiceManager.cs
- TcpProcessProtocolHandler.cs
- PrimitiveSchema.cs
- ToolStripEditorManager.cs
- X509Chain.cs
- WpfXamlType.cs
- BoundsDrawingContextWalker.cs
- ServiceHost.cs
- QilFunction.cs
- SplineKeyFrames.cs
- WaitHandle.cs
- Page.cs
- fixedPageContentExtractor.cs
- PropertyPushdownHelper.cs
- DbConvert.cs
- PolygonHotSpot.cs
- URLIdentityPermission.cs
- DelegatingConfigHost.cs
- HtmlTable.cs
- Vector3DAnimationUsingKeyFrames.cs
- ParseChildrenAsPropertiesAttribute.cs
- Msec.cs
- WaitHandleCannotBeOpenedException.cs
- SocketInformation.cs
- DispatcherExceptionEventArgs.cs
- RecognitionResult.cs
- XsdValidatingReader.cs
- SHA256Cng.cs
- EdmRelationshipRoleAttribute.cs
- TakeOrSkipWhileQueryOperator.cs
- OleStrCAMarshaler.cs
- TextEffectCollection.cs
- SqlDataSourceSelectingEventArgs.cs
- ZoneMembershipCondition.cs
- ToolStripTextBox.cs
- AuthStoreRoleProvider.cs
- InvalidAsynchronousStateException.cs
- ScrollBarAutomationPeer.cs
- SortKey.cs
- SmiRequestExecutor.cs
- DeferredReference.cs
- DocumentXmlWriter.cs
- TimeManager.cs
- Style.cs
- XmlBinaryReader.cs
- WorkflowCommandExtensionItem.cs
- SystemNetHelpers.cs
- Delegate.cs
- Preprocessor.cs