Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / Designer / WinForms / System / WinForms / Design / ListControlStringCollectionEditor.cs / 1 / ListControlStringCollectionEditor.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Scope="member", Target="System.Windows.Forms.Design.ListControlStringCollectionEditor..ctor(System.Type)")] namespace System.Windows.Forms.Design { using System.Design; using System.ComponentModel; using System; using System.Collections; using Microsoft.Win32; using System.ComponentModel.Design; using System.Diagnostics; using System.Drawing; using System.Windows.Forms; ////// /// The ListControlStringCollectionEditor override StringCollectionEditor /// to prevent the string collection from being edited if a DataSource /// has been set on the control. /// internal class ListControlStringCollectionEditor : StringCollectionEditor { public ListControlStringCollectionEditor(Type type) : base(type) { } public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) { // If we're trying to edit the items in an object that has a DataSource set, throw an exception // ListControl control = context.Instance as ListControl; if (control != null && control.DataSource != null) { throw new ArgumentException(SR.GetString(SR.DataSourceLocksItems)); } return base.EditValue(context, provider, value); } } } // 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
- Process.cs
- ConfigXmlWhitespace.cs
- ProxyGenerationError.cs
- ExpressionBuilder.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- ClonableStack.cs
- _NTAuthentication.cs
- RsaEndpointIdentity.cs
- ObjectSecurity.cs
- StateFinalizationDesigner.cs
- COMException.cs
- UserThread.cs
- RegexRunnerFactory.cs
- DataRowCollection.cs
- AssemblyAttributes.cs
- WebBrowserBase.cs
- XPathParser.cs
- ShapingEngine.cs
- Literal.cs
- PrintingPermission.cs
- DiagnosticsElement.cs
- TextBox.cs
- Formatter.cs
- SerializationInfo.cs
- PrintDialog.cs
- CodeObject.cs
- XmlUtilWriter.cs
- Root.cs
- DataGridRowAutomationPeer.cs
- Console.cs
- ArrayListCollectionBase.cs
- SystemMulticastIPAddressInformation.cs
- PropertyConverter.cs
- OwnerDrawPropertyBag.cs
- ObjectAnimationBase.cs
- _ConnectOverlappedAsyncResult.cs
- BaseCollection.cs
- SQLString.cs
- MethodAccessException.cs
- LongValidator.cs
- XPathNavigator.cs
- EventLogPermissionEntryCollection.cs
- TraceData.cs
- LowerCaseStringConverter.cs
- WindowsScroll.cs
- DataGridViewMethods.cs
- DateTimeConverter.cs
- DynamicRendererThreadManager.cs
- HttpInputStream.cs
- SessionIDManager.cs
- VersionPair.cs
- OrCondition.cs
- CodeAttributeDeclarationCollection.cs
- DetailsViewModeEventArgs.cs
- DataGridGeneralPage.cs
- UnauthorizedWebPart.cs
- jithelpers.cs
- Int32Converter.cs
- DataTableMapping.cs
- CriticalFinalizerObject.cs
- StylusOverProperty.cs
- Control.cs
- WebPartActionVerb.cs
- Debug.cs
- OutOfMemoryException.cs
- UpDownBase.cs
- MULTI_QI.cs
- SimplePropertyEntry.cs
- WeakHashtable.cs
- HotCommands.cs
- SoapTypeAttribute.cs
- DataGridRow.cs
- SortDescription.cs
- TextElementCollectionHelper.cs
- GenericWebPart.cs
- HttpStreamMessageEncoderFactory.cs
- ItemDragEvent.cs
- IpcChannel.cs
- Point3DConverter.cs
- XXXOnTypeBuilderInstantiation.cs
- PrintDocument.cs
- DataProviderNameConverter.cs
- CodeArrayCreateExpression.cs
- WCFBuildProvider.cs
- Ipv6Element.cs
- CroppedBitmap.cs
- CommandConverter.cs
- CollectionBuilder.cs
- StatusStrip.cs
- XmlChildEnumerator.cs
- DoubleCollectionValueSerializer.cs
- ByteKeyFrameCollection.cs
- XmlElementAttribute.cs
- CellParaClient.cs
- ToolboxItemLoader.cs
- CreateParams.cs
- MemberCollection.cs
- DefaultAsyncDataDispatcher.cs
- DateTimeOffset.cs
- XPathExpr.cs