Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / WinForms / Managed / System / WinForms / ListManagerBindingsCollection.cs / 1305376 / ListManagerBindingsCollection.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Windows.Forms { using System; using Microsoft.Win32; using System.Diagnostics; using System.ComponentModel; using System.Collections; ////// /// BindingsCollection is a collection of bindings for a Control. It has Add/Remove capabilities, /// as well as an All array property, enumeration, etc. /// [DefaultEvent("CollectionChanged")] internal class ListManagerBindingsCollection : BindingsCollection { private BindingManagerBase bindingManagerBase; ////// /// ColumnsCollection constructor. Used only by DataSource. /// internal ListManagerBindingsCollection(BindingManagerBase bindingManagerBase) : base() { Debug.Assert(bindingManagerBase != null, "How could a listmanagerbindingscollection not have a bindingManagerBase associated with it!"); this.bindingManagerBase = bindingManagerBase; } protected override void AddCore(Binding dataBinding) { if (dataBinding == null) throw new ArgumentNullException("dataBinding"); if (dataBinding.BindingManagerBase == bindingManagerBase) throw new ArgumentException(SR.GetString(SR.BindingsCollectionAdd1), "dataBinding"); if (dataBinding.BindingManagerBase != null) throw new ArgumentException(SR.GetString(SR.BindingsCollectionAdd2), "dataBinding"); // important to set prop first for error checking. dataBinding.SetListManager(bindingManagerBase); base.AddCore(dataBinding); } protected override void ClearCore() { int numLinks = Count; for (int i = 0; i < numLinks; i++) { Binding dataBinding = this[i]; dataBinding.SetListManager(null); } base.ClearCore(); } protected override void RemoveCore(Binding dataBinding) { if (dataBinding.BindingManagerBase != bindingManagerBase) throw new ArgumentException(SR.GetString(SR.BindingsCollectionForeign)); dataBinding.SetListManager(null); base.RemoveCore(dataBinding); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- URL.cs
- SymmetricCryptoHandle.cs
- IssuerInformation.cs
- precedingsibling.cs
- DataBinder.cs
- DbConnectionClosed.cs
- ObjectAnimationUsingKeyFrames.cs
- SmtpTransport.cs
- GridViewEditEventArgs.cs
- Panel.cs
- InternalCompensate.cs
- WebCategoryAttribute.cs
- GridErrorDlg.cs
- HMACSHA256.cs
- DataGridViewColumnConverter.cs
- ContractValidationHelper.cs
- MiniCustomAttributeInfo.cs
- IERequestCache.cs
- TextBlock.cs
- UndirectedGraph.cs
- HtmlElementCollection.cs
- _Win32.cs
- QueryPageSettingsEventArgs.cs
- CollectionConverter.cs
- SmtpSection.cs
- IsolatedStoragePermission.cs
- CompoundFileStorageReference.cs
- DoubleLink.cs
- DiscoveryClientReferences.cs
- ITextView.cs
- Validator.cs
- AxisAngleRotation3D.cs
- Table.cs
- PropertiesTab.cs
- counter.cs
- PrinterUnitConvert.cs
- Int32EqualityComparer.cs
- HtmlTernaryTree.cs
- CircleHotSpot.cs
- OpenTypeLayoutCache.cs
- ProfileEventArgs.cs
- ExpressionNode.cs
- ImagingCache.cs
- AppLevelCompilationSectionCache.cs
- EmbeddedMailObjectsCollection.cs
- AliasedSlot.cs
- TimeoutException.cs
- ColorKeyFrameCollection.cs
- FormatterConverter.cs
- GenerateHelper.cs
- HtmlHead.cs
- GeneralTransform2DTo3DTo2D.cs
- DataTrigger.cs
- CodeDomConfigurationHandler.cs
- TableAutomationPeer.cs
- CapabilitiesState.cs
- DefaultProxySection.cs
- DataGridViewCellValidatingEventArgs.cs
- HasActivatableWorkflowEvent.cs
- XMLSchema.cs
- StackBuilderSink.cs
- Vector3DAnimationBase.cs
- RelativeSource.cs
- AsyncOperation.cs
- ObjectTypeMapping.cs
- SchemaDeclBase.cs
- ButtonField.cs
- WebSysDisplayNameAttribute.cs
- XmlBinaryReader.cs
- ImmutableDispatchRuntime.cs
- SecurityResources.cs
- GAC.cs
- DateRangeEvent.cs
- HttpResponseInternalBase.cs
- ControlUtil.cs
- CompareInfo.cs
- TraceUtils.cs
- Camera.cs
- ResourceSet.cs
- XmlSchemaObjectCollection.cs
- ConfigXmlElement.cs
- ColorDialog.cs
- MeasureItemEvent.cs
- QilInvokeEarlyBound.cs
- CreateRefExpr.cs
- path.cs
- Schema.cs
- Block.cs
- IndentedWriter.cs
- BasePropertyDescriptor.cs
- DesignerRegionMouseEventArgs.cs
- sqlpipe.cs
- SortDescriptionCollection.cs
- XmlValueConverter.cs
- Geometry.cs
- DesigntimeLicenseContext.cs
- LateBoundBitmapDecoder.cs
- ContentWrapperAttribute.cs
- ServiceAppDomainAssociationProvider.cs
- _Events.cs