Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / Designer / WinForms / System / WinForms / Design / DataSourceListEditor.cs / 1 / DataSourceListEditor.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Scope="member", Target="System.Windows.Forms.Design.DataSourceListEditor..ctor()")] namespace System.Windows.Forms.Design { using System.Design; using System; using System.ComponentModel; using System.ComponentModel.Design; using System.Drawing; using System.Drawing.Design; internal class DataSourceListEditor : UITypeEditor { private DesignBindingPicker designBindingPicker; public override bool IsDropDownResizable { get { return true; } } public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) { if (provider != null && context.Instance != null) { if (designBindingPicker == null) { designBindingPicker = new DesignBindingPicker(); } DesignBinding oldSelection = new DesignBinding(value, ""); DesignBinding newSelection = designBindingPicker.Pick(context, provider, true, /* showDataSources */ false, /* showDataMembers */ false, /* selectListMembers */ null, String.Empty, oldSelection); if (newSelection != null) { value = newSelection.DataSource; } } return value; } public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context) { return UITypeEditorEditStyle.DropDown; } } } // 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
- HorizontalAlignConverter.cs
- DesignerTransactionCloseEvent.cs
- RowSpanVector.cs
- DataGridViewAutoSizeColumnsModeEventArgs.cs
- BaseDataBoundControl.cs
- MappingItemCollection.cs
- FactoryGenerator.cs
- ReadonlyMessageFilter.cs
- XmlConvert.cs
- SqlGenericUtil.cs
- HttpCookie.cs
- SymbolPair.cs
- AttachedAnnotationChangedEventArgs.cs
- UriTemplateMatch.cs
- BehaviorEditorPart.cs
- SrgsSemanticInterpretationTag.cs
- Asn1IntegerConverter.cs
- EventManager.cs
- ProxyManager.cs
- UIHelper.cs
- Rect3DValueSerializer.cs
- ISAPIRuntime.cs
- WindowInteractionStateTracker.cs
- Vector3DCollectionValueSerializer.cs
- CachingHintValidation.cs
- AttachmentService.cs
- ProcessHostServerConfig.cs
- ZipIOExtraFieldPaddingElement.cs
- StoreAnnotationsMap.cs
- WindowsAuthenticationEventArgs.cs
- ListSortDescriptionCollection.cs
- TextTrailingCharacterEllipsis.cs
- WebPartHeaderCloseVerb.cs
- StreamProxy.cs
- XmlSchemaAnyAttribute.cs
- SplitterCancelEvent.cs
- WebPartCloseVerb.cs
- Label.cs
- TextEditorSpelling.cs
- TriState.cs
- RoutedEventConverter.cs
- SmtpMail.cs
- ComEventsSink.cs
- ValuePatternIdentifiers.cs
- Configuration.cs
- ProxyGenerator.cs
- DesignerCategoryAttribute.cs
- __Error.cs
- TypeSystemProvider.cs
- SchemaImporter.cs
- ReachPageContentCollectionSerializer.cs
- DragDeltaEventArgs.cs
- StringWriter.cs
- ToolStripOverflow.cs
- RoleServiceManager.cs
- VectorAnimationUsingKeyFrames.cs
- WaitHandle.cs
- XmlWhitespace.cs
- XhtmlBasicTextBoxAdapter.cs
- SynchronizedInputProviderWrapper.cs
- SequentialWorkflowHeaderFooter.cs
- XsdBuilder.cs
- Marshal.cs
- GenericAuthenticationEventArgs.cs
- RunInstallerAttribute.cs
- DataGridViewIntLinkedList.cs
- KeyManager.cs
- DeploymentSection.cs
- HotSpotCollection.cs
- X509DefaultServiceCertificateElement.cs
- ArgumentException.cs
- DesignerActionUI.cs
- GridViewRowPresenter.cs
- KeyPressEvent.cs
- EmptyQuery.cs
- ThrowHelper.cs
- DbExpressionRules.cs
- HttpDictionary.cs
- PackWebRequest.cs
- WrappingXamlSchemaContext.cs
- FileIOPermission.cs
- CodeNamespaceImportCollection.cs
- XsdValidatingReader.cs
- ValidateNames.cs
- Soap11ServerProtocol.cs
- CreateUserErrorEventArgs.cs
- DataGridViewRowPrePaintEventArgs.cs
- ChangeDirector.cs
- AnonymousIdentificationSection.cs
- GeometryGroup.cs
- WorkflowMarkupSerializer.cs
- SendKeys.cs
- ExpressionPrefixAttribute.cs
- EventlogProvider.cs
- _OSSOCK.cs
- CodeConstructor.cs
- SessionStateContainer.cs
- PointConverter.cs
- Stack.cs
- QilInvoke.cs