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
- TraceSection.cs
- FloaterBaseParaClient.cs
- ListViewCancelEventArgs.cs
- LexicalChunk.cs
- RightsManagementInformation.cs
- BookmarkInfo.cs
- WebDescriptionAttribute.cs
- CodePropertyReferenceExpression.cs
- CodePageUtils.cs
- XPathDescendantIterator.cs
- Vector.cs
- CodeAttributeDeclarationCollection.cs
- ColumnMapCopier.cs
- StorageSetMapping.cs
- DocumentSequenceHighlightLayer.cs
- CodeIdentifier.cs
- SafeRightsManagementPubHandle.cs
- ImageMap.cs
- VisualProxy.cs
- IndicFontClient.cs
- SimpleHandlerFactory.cs
- BaseValidator.cs
- XmlSchemaSet.cs
- NamespaceQuery.cs
- basecomparevalidator.cs
- StateChangeEvent.cs
- StaticExtension.cs
- TypeElementCollection.cs
- RSAOAEPKeyExchangeDeformatter.cs
- DateTimePicker.cs
- SafePEFileHandle.cs
- RepeaterCommandEventArgs.cs
- brushes.cs
- FlowThrottle.cs
- BuildManager.cs
- ExtensibleClassFactory.cs
- NativeMethods.cs
- TreeNodeSelectionProcessor.cs
- SqlConnectionPoolGroupProviderInfo.cs
- EnumerableWrapperWeakToStrong.cs
- TraceListener.cs
- CheckBox.cs
- RepeaterItem.cs
- GregorianCalendar.cs
- FlowDocumentPage.cs
- PageBreakRecord.cs
- NotCondition.cs
- EngineSiteSapi.cs
- JsonUriDataContract.cs
- Util.cs
- InputChannelBinder.cs
- ApplicationFileParser.cs
- StringDictionary.cs
- GridProviderWrapper.cs
- Expression.DebuggerProxy.cs
- TreeNodeEventArgs.cs
- ServiceBuildProvider.cs
- PointLightBase.cs
- EditingCommands.cs
- SvcMapFileSerializer.cs
- DeviceContext.cs
- TemplatedMailWebEventProvider.cs
- Bits.cs
- WebPartsPersonalization.cs
- _UriSyntax.cs
- FontStretches.cs
- MarkupObject.cs
- OutputCacheSection.cs
- PkcsUtils.cs
- XPathScanner.cs
- NameValuePair.cs
- OperandQuery.cs
- Shape.cs
- EntityDesignerUtils.cs
- CodeTypeOfExpression.cs
- _IPv4Address.cs
- Compress.cs
- ControlEvent.cs
- AddInToken.cs
- TripleDES.cs
- CorrelationManager.cs
- VirtualDirectoryMappingCollection.cs
- SimpleFileLog.cs
- OletxEnlistment.cs
- BatchServiceHost.cs
- FontConverter.cs
- HttpRequestTraceRecord.cs
- ProcessProtocolHandler.cs
- Matrix.cs
- ApplicationGesture.cs
- ExtendedPropertyCollection.cs
- MdiWindowListStrip.cs
- ColorDialog.cs
- MsmqPoisonMessageException.cs
- MarkerProperties.cs
- IPHostEntry.cs
- AmbiguousMatchException.cs
- Baml6ConstructorInfo.cs
- CollectionContainer.cs
- DataReaderContainer.cs