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
- PropertyInformation.cs
- PerfCounterSection.cs
- StrokeNodeOperations2.cs
- BrowserCapabilitiesFactory.cs
- NativeMethods.cs
- RoutedEventHandlerInfo.cs
- TextServicesCompartment.cs
- BatchStream.cs
- SliderAutomationPeer.cs
- RelationshipManager.cs
- CounterCreationDataCollection.cs
- DbParameterCollectionHelper.cs
- FormViewModeEventArgs.cs
- BaseWebProxyFinder.cs
- EDesignUtil.cs
- Claim.cs
- ToolCreatedEventArgs.cs
- CompilerCollection.cs
- FrameworkElementAutomationPeer.cs
- RenderDataDrawingContext.cs
- CodeCommentStatementCollection.cs
- DataListItem.cs
- PersonalizationState.cs
- COAUTHIDENTITY.cs
- ServiceObjectContainer.cs
- AlternationConverter.cs
- StyleXamlParser.cs
- ButtonBaseAutomationPeer.cs
- HtmlSelect.cs
- SkinBuilder.cs
- BufferedGraphics.cs
- GridViewRowEventArgs.cs
- MimeWriter.cs
- TextParaLineResult.cs
- SqlProfileProvider.cs
- AppSecurityManager.cs
- SecurityContextTokenCache.cs
- VScrollBar.cs
- AspNetHostingPermission.cs
- DataGridViewAdvancedBorderStyle.cs
- WsdlEndpointConversionContext.cs
- PropertyGridCommands.cs
- DataGridViewCellLinkedList.cs
- ExtensionQuery.cs
- CustomCategoryAttribute.cs
- DynamicResourceExtensionConverter.cs
- StringReader.cs
- ColorTypeConverter.cs
- SymDocumentType.cs
- FontInfo.cs
- MobileControlsSection.cs
- mansign.cs
- SafeReversePInvokeHandle.cs
- SqlColumnizer.cs
- XmlToDatasetMap.cs
- HttpRuntime.cs
- RuntimeConfigurationRecord.cs
- PointIndependentAnimationStorage.cs
- Matrix3D.cs
- TypeReference.cs
- WebControlParameterProxy.cs
- XdrBuilder.cs
- DataGridViewColumnCollection.cs
- PageHandlerFactory.cs
- EtwTrace.cs
- HtmlElement.cs
- HyperLinkField.cs
- DeobfuscatingStream.cs
- CloudCollection.cs
- BrowserDefinition.cs
- RtfControls.cs
- Screen.cs
- LogEntryHeaderDeserializer.cs
- LogSwitch.cs
- SqlVisitor.cs
- SQLByteStorage.cs
- BehaviorEditorPart.cs
- ClientRolePrincipal.cs
- ObjectViewQueryResultData.cs
- HttpContext.cs
- ContextMenuStrip.cs
- ItemCollection.cs
- ClientBuildManagerCallback.cs
- WebControl.cs
- WebPartsPersonalizationAuthorization.cs
- ClientProxyGenerator.cs
- LoadRetryHandler.cs
- SourceSwitch.cs
- QuaternionAnimation.cs
- FormattedText.cs
- SqlLiftIndependentRowExpressions.cs
- DatagridviewDisplayedBandsData.cs
- URL.cs
- Highlights.cs
- SecurityState.cs
- ArrowControl.xaml.cs
- SamlNameIdentifierClaimResource.cs
- UpDownBaseDesigner.cs
- DeadCharTextComposition.cs
- TextRange.cs