Code:
/ FX-1434 / FX-1434 / 1.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
- FontSizeConverter.cs
- datacache.cs
- XmlAttribute.cs
- DuplexChannelFactory.cs
- JpegBitmapDecoder.cs
- ExecutionContext.cs
- RegexWorker.cs
- PropertyCondition.cs
- ResourceDisplayNameAttribute.cs
- Control.cs
- RbTree.cs
- CommentEmitter.cs
- DocumentCollection.cs
- ClientTargetSection.cs
- SHA256.cs
- WindowManager.cs
- GPRECTF.cs
- EntityStoreSchemaGenerator.cs
- serverconfig.cs
- FilteredReadOnlyMetadataCollection.cs
- TypefaceMetricsCache.cs
- OleDbCommand.cs
- OdbcHandle.cs
- HttpResponseBase.cs
- SpellerError.cs
- TextServicesManager.cs
- PointAnimationUsingPath.cs
- ImageIndexConverter.cs
- BStrWrapper.cs
- Constraint.cs
- BridgeDataReader.cs
- X509Certificate2Collection.cs
- MenuItemBindingCollection.cs
- SmiEventStream.cs
- SqlCachedBuffer.cs
- SystemException.cs
- TextComposition.cs
- QueryableDataSourceHelper.cs
- SecurityPermission.cs
- ObjectListTitleAttribute.cs
- ToolStripOverflow.cs
- ClrProviderManifest.cs
- FontSourceCollection.cs
- ResourceAssociationSet.cs
- HtmlInputPassword.cs
- ExpandCollapsePattern.cs
- Buffer.cs
- SplitterCancelEvent.cs
- LexicalChunk.cs
- DataGridAddNewRow.cs
- RedistVersionInfo.cs
- MenuAutomationPeer.cs
- ScrollItemPattern.cs
- CryptoConfig.cs
- AmbientLight.cs
- MILUtilities.cs
- OutKeywords.cs
- OpenTypeLayout.cs
- ElementProxy.cs
- SplashScreenNativeMethods.cs
- HttpListenerPrefixCollection.cs
- ColumnReorderedEventArgs.cs
- WebPartCatalogAddVerb.cs
- TraceLevelStore.cs
- ClientTargetSection.cs
- _FixedSizeReader.cs
- ProcessHostMapPath.cs
- TextContainerHelper.cs
- UserMapPath.cs
- GZipStream.cs
- FontConverter.cs
- BamlCollectionHolder.cs
- TerminatorSinks.cs
- BackoffTimeoutHelper.cs
- MultiViewDesigner.cs
- SqlDataReader.cs
- DictionaryBase.cs
- AttributeAction.cs
- ValueUtilsSmi.cs
- ChannelSinkStacks.cs
- DataGridViewCellValidatingEventArgs.cs
- Options.cs
- ShaderEffect.cs
- ApplicationException.cs
- SoapAttributeAttribute.cs
- SQLRoleProvider.cs
- ObjectDataSourceDisposingEventArgs.cs
- FolderLevelBuildProviderAppliesToAttribute.cs
- XamlPoint3DCollectionSerializer.cs
- RuleRef.cs
- ValidationSummary.cs
- CodeAttachEventStatement.cs
- DataTemplate.cs
- DataGridViewIntLinkedList.cs
- SparseMemoryStream.cs
- ObjectHelper.cs
- Switch.cs
- CultureTableRecord.cs
- MobileCategoryAttribute.cs
- Graph.cs