Code:
/ 4.0 / 4.0 / untmp / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- RegistrySecurity.cs
- RSAProtectedConfigurationProvider.cs
- TextContainerChangedEventArgs.cs
- XPathEmptyIterator.cs
- CollectionsUtil.cs
- NodeFunctions.cs
- ImportCatalogPart.cs
- ProfileServiceManager.cs
- CodeExpressionRuleDeclaration.cs
- TemplatedEditableDesignerRegion.cs
- XsltOutput.cs
- ReversePositionQuery.cs
- OracleColumn.cs
- InputMethodStateChangeEventArgs.cs
- WpfSharedXamlSchemaContext.cs
- ZipIOExtraField.cs
- ThemeDirectoryCompiler.cs
- COM2Enum.cs
- MessageQueuePermission.cs
- IteratorFilter.cs
- BasicExpressionVisitor.cs
- ParameterCollection.cs
- XPathDocumentNavigator.cs
- Queue.cs
- AsyncDataRequest.cs
- RelatedPropertyManager.cs
- CompilerCollection.cs
- RequestQueue.cs
- _ShellExpression.cs
- StaticResourceExtension.cs
- ViewStateModeByIdAttribute.cs
- OleDbSchemaGuid.cs
- ScopelessEnumAttribute.cs
- InternalEnumValidator.cs
- InfoCard.cs
- DataGridViewCheckBoxColumn.cs
- HttpHandlersSection.cs
- login.cs
- DetailsViewDeletedEventArgs.cs
- TakeOrSkipWhileQueryOperator.cs
- PathParser.cs
- FixedFindEngine.cs
- DataSourceIDConverter.cs
- UriScheme.cs
- MenuItemAutomationPeer.cs
- FileCodeGroup.cs
- PersonalizationProviderHelper.cs
- LayoutManager.cs
- MatrixTransform.cs
- HttpCacheParams.cs
- QilReplaceVisitor.cs
- HandlerFactoryWrapper.cs
- CompressionTransform.cs
- ParentControlDesigner.cs
- ImageConverter.cs
- Walker.cs
- NamespaceList.cs
- X509Utils.cs
- ZeroOpNode.cs
- TypeUtil.cs
- HttpProfileBase.cs
- X509LogoTypeExtension.cs
- ObfuscationAttribute.cs
- ServiceHost.cs
- CompilerErrorCollection.cs
- DbgCompiler.cs
- InternalConfigHost.cs
- SQLResource.cs
- Int32RectValueSerializer.cs
- NameObjectCollectionBase.cs
- LogEntryHeaderv1Deserializer.cs
- ParameterCollection.cs
- PropertyBuilder.cs
- ThreadStaticAttribute.cs
- TrackingStringDictionary.cs
- Debug.cs
- BlockCollection.cs
- TemplateBindingExpression.cs
- StandardToolWindows.cs
- CompilerGlobalScopeAttribute.cs
- RestHandlerFactory.cs
- ToolStripLabel.cs
- BaseDataList.cs
- HtmlElementErrorEventArgs.cs
- ipaddressinformationcollection.cs
- PolicyValidator.cs
- MessageSmuggler.cs
- DbSetClause.cs
- WindowsFormsLinkLabel.cs
- OleDbTransaction.cs
- SurrogateSelector.cs
- CheckBoxAutomationPeer.cs
- AssemblyBuilderData.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- CompositeKey.cs
- GeneralTransformGroup.cs
- ConfigurationValues.cs
- ListViewItem.cs
- DeobfuscatingStream.cs
- CacheAxisQuery.cs