Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / Controls / SelectedCellsChangedEventArgs.cs / 1305600 / SelectedCellsChangedEventArgs.cs
//---------------------------------------------------------------------------- // // Copyright (C) Microsoft Corporation. All rights reserved. // //--------------------------------------------------------------------------- using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Diagnostics; namespace System.Windows.Controls { ////// Communicates which cells were added or removed from the SelectedCells collection. /// public class SelectedCellsChangedEventArgs : EventArgs { ////// Creates a new instance of this class. /// /// The cells that were added. Must be non-null, but may be empty. /// The cells that were removed. Must be non-null, but may be empty. public SelectedCellsChangedEventArgs(ListaddedCells, List removedCells) { if (addedCells == null) { throw new ArgumentNullException("addedCells"); } if (removedCells == null) { throw new ArgumentNullException("removedCells"); } _addedCells = addedCells.AsReadOnly(); _removedCells = removedCells.AsReadOnly(); } /// /// Creates a new instance of this class. /// /// The cells that were added. Must be non-null, but may be empty. /// The cells that were removed. Must be non-null, but may be empty. public SelectedCellsChangedEventArgs(ReadOnlyCollectionaddedCells, ReadOnlyCollection removedCells) { if (addedCells == null) { throw new ArgumentNullException("addedCells"); } if (removedCells == null) { throw new ArgumentNullException("removedCells"); } _addedCells = addedCells; _removedCells = removedCells; } internal SelectedCellsChangedEventArgs(DataGrid owner, VirtualizedCellInfoCollection addedCells, VirtualizedCellInfoCollection removedCells) { _addedCells = (addedCells != null) ? addedCells : VirtualizedCellInfoCollection.MakeEmptyCollection(owner); _removedCells = (removedCells != null) ? removedCells : VirtualizedCellInfoCollection.MakeEmptyCollection(owner); Debug.Assert(_addedCells.IsReadOnly, "_addedCells should have ended up as read-only."); Debug.Assert(_removedCells.IsReadOnly, "_removedCells should have ended up as read-only."); } /// /// The cells that were added. /// public IListAddedCells { get { return _addedCells; } } /// /// The cells that were removed. /// public IListRemovedCells { get { return _removedCells; } } private IList _addedCells; private IList _removedCells; } } // 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.Generic; using System.Collections.ObjectModel; using System.Diagnostics; namespace System.Windows.Controls { /// /// Communicates which cells were added or removed from the SelectedCells collection. /// public class SelectedCellsChangedEventArgs : EventArgs { ////// Creates a new instance of this class. /// /// The cells that were added. Must be non-null, but may be empty. /// The cells that were removed. Must be non-null, but may be empty. public SelectedCellsChangedEventArgs(ListaddedCells, List removedCells) { if (addedCells == null) { throw new ArgumentNullException("addedCells"); } if (removedCells == null) { throw new ArgumentNullException("removedCells"); } _addedCells = addedCells.AsReadOnly(); _removedCells = removedCells.AsReadOnly(); } /// /// Creates a new instance of this class. /// /// The cells that were added. Must be non-null, but may be empty. /// The cells that were removed. Must be non-null, but may be empty. public SelectedCellsChangedEventArgs(ReadOnlyCollectionaddedCells, ReadOnlyCollection removedCells) { if (addedCells == null) { throw new ArgumentNullException("addedCells"); } if (removedCells == null) { throw new ArgumentNullException("removedCells"); } _addedCells = addedCells; _removedCells = removedCells; } internal SelectedCellsChangedEventArgs(DataGrid owner, VirtualizedCellInfoCollection addedCells, VirtualizedCellInfoCollection removedCells) { _addedCells = (addedCells != null) ? addedCells : VirtualizedCellInfoCollection.MakeEmptyCollection(owner); _removedCells = (removedCells != null) ? removedCells : VirtualizedCellInfoCollection.MakeEmptyCollection(owner); Debug.Assert(_addedCells.IsReadOnly, "_addedCells should have ended up as read-only."); Debug.Assert(_removedCells.IsReadOnly, "_removedCells should have ended up as read-only."); } /// /// The cells that were added. /// public IListAddedCells { get { return _addedCells; } } /// /// The cells that were removed. /// public IListRemovedCells { get { return _removedCells; } } private IList _addedCells; private IList _removedCells; } } // 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
- NotifyCollectionChangedEventArgs.cs
- ButtonRenderer.cs
- XmlSerializerSection.cs
- COM2PictureConverter.cs
- ActiveDocumentEvent.cs
- InputScopeManager.cs
- ObjectNotFoundException.cs
- BuiltInPermissionSets.cs
- DispatchProxy.cs
- BaseCollection.cs
- WasAdminWrapper.cs
- InternalConfigConfigurationFactory.cs
- TransactionScope.cs
- DescendentsWalkerBase.cs
- ProfilePropertyNameValidator.cs
- ObjRef.cs
- MimeBasePart.cs
- PersonalizationStateQuery.cs
- XsltLibrary.cs
- StringComparer.cs
- GatewayDefinition.cs
- StringOutput.cs
- XhtmlBasicLiteralTextAdapter.cs
- DbConnectionPoolCounters.cs
- DataBindingCollection.cs
- DeploymentExceptionMapper.cs
- MessageFilterTable.cs
- DetailsViewModeEventArgs.cs
- ListView.cs
- RepeatInfo.cs
- HttpCookiesSection.cs
- HttpMethodConstraint.cs
- processwaithandle.cs
- CompositeDataBoundControl.cs
- XPathNavigator.cs
- RequestedSignatureDialog.cs
- CompensateDesigner.cs
- WebExceptionStatus.cs
- XamlParser.cs
- BamlRecordReader.cs
- DataGridViewColumnConverter.cs
- PerfCounterSection.cs
- IntegerValidatorAttribute.cs
- GenericTypeParameterBuilder.cs
- ListViewGroup.cs
- MethodToken.cs
- JsonServiceDocumentSerializer.cs
- BlockUIContainer.cs
- SqlUserDefinedTypeAttribute.cs
- LogLogRecordEnumerator.cs
- StorageEntityTypeMapping.cs
- BitVec.cs
- XmlSchemaAppInfo.cs
- StorageEntitySetMapping.cs
- TextRangeEditLists.cs
- SqlDataSourceConnectionPanel.cs
- ScriptIgnoreAttribute.cs
- DataStorage.cs
- DynamicUpdateCommand.cs
- ZoneLinkButton.cs
- X509Chain.cs
- WebPartTracker.cs
- MultiPageTextView.cs
- X509ClientCertificateAuthenticationElement.cs
- WebContext.cs
- ServicePointManagerElement.cs
- PriorityItem.cs
- RectValueSerializer.cs
- ImageSource.cs
- PointHitTestResult.cs
- Point3DAnimationBase.cs
- WebPartConnectionCollection.cs
- CollectionMarkupSerializer.cs
- Directory.cs
- DispatcherFrame.cs
- validationstate.cs
- StringTraceRecord.cs
- Tablet.cs
- XomlSerializationHelpers.cs
- MetabaseSettings.cs
- BufferAllocator.cs
- DataServiceProcessingPipelineEventArgs.cs
- FrameworkTemplate.cs
- JoinSymbol.cs
- CheckBoxFlatAdapter.cs
- ReadOnlyCollectionBase.cs
- AllowedAudienceUriElementCollection.cs
- CharConverter.cs
- DefaultPropertyAttribute.cs
- KeySplineConverter.cs
- Matrix3DStack.cs
- WebPartCatalogAddVerb.cs
- StandardCommandToolStripMenuItem.cs
- SqlDelegatedTransaction.cs
- TextWriterTraceListener.cs
- DLinqColumnProvider.cs
- AuthenticationModuleElement.cs
- ApplicationInterop.cs
- TailCallAnalyzer.cs
- NetPipeSection.cs