Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / Designer / WebForms / System / Web / UI / Design / WebControls / DataControlFieldTypeEditor.cs / 1 / DataControlFieldTypeEditor.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.Design.WebControls { using System; using System.ComponentModel; using System.ComponentModel.Design; using System.Design; using System.Diagnostics; using System.Drawing.Design; using System.Web.UI.Design.Util; using System.Web.UI.WebControls; using System.Windows.Forms; ////// The editor used for property grid field collection edits. /// public class DataControlFieldTypeEditor : UITypeEditor { ////// Launches the editor for DataControlFields. /// public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) { DataBoundControl dataBoundControl = context.Instance as DataBoundControl; Debug.Assert(dataBoundControl != null, "Only DataBoundControls should be used with DataControlFieldTypeEditor"); if (dataBoundControl != null) { IDesignerHost designerHost = (IDesignerHost)provider.GetService(typeof(IDesignerHost)); Debug.Assert(designerHost != null, "Did not get DesignerHost service."); DataBoundControlDesigner designer = (DataBoundControlDesigner)designerHost.GetDesigner(dataBoundControl); IComponentChangeService changeService = (IComponentChangeService)provider.GetService(typeof(IComponentChangeService)); DataControlFieldsEditor form = new DataControlFieldsEditor(designer); DialogResult result = UIServiceHelper.ShowDialog(provider, form); if (result == DialogResult.OK) { if (changeService != null) { changeService.OnComponentChanged(dataBoundControl, null, null, null); } } return value; } return null; } ////// Gets the editing style of the Edit method. /// public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context) { return UITypeEditorEditStyle.Modal; } } } // 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
- RuntimeArgumentHandle.cs
- SubclassTypeValidator.cs
- CellPartitioner.cs
- RuleSettings.cs
- HttpStreamFormatter.cs
- ReflectionPermission.cs
- ContentHostHelper.cs
- TextChangedEventArgs.cs
- CalendarKeyboardHelper.cs
- InputLanguageManager.cs
- DataRecordObjectView.cs
- DataGridCell.cs
- FieldAccessException.cs
- InternalBase.cs
- PaintValueEventArgs.cs
- RsaSecurityToken.cs
- BooleanFacetDescriptionElement.cs
- DataErrorValidationRule.cs
- InteropBitmapSource.cs
- CodeVariableDeclarationStatement.cs
- X509Extension.cs
- NativeMethods.cs
- _Events.cs
- ImportContext.cs
- WebMessageFormatHelper.cs
- SingleObjectCollection.cs
- TargetPerspective.cs
- CalendarButton.cs
- Timer.cs
- RegisteredScript.cs
- ProcessInfo.cs
- ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs
- XmlSchemaIdentityConstraint.cs
- RegexParser.cs
- SplashScreenNativeMethods.cs
- GroupByExpressionRewriter.cs
- XmlSchemaException.cs
- PreviewPageInfo.cs
- CodePrimitiveExpression.cs
- WSSecurityJan2004.cs
- SectionInput.cs
- HyperLinkColumn.cs
- DescendantOverDescendantQuery.cs
- ValidationErrorInfo.cs
- SchemaTypeEmitter.cs
- WebServiceHandlerFactory.cs
- InstanceView.cs
- CssTextWriter.cs
- VectorValueSerializer.cs
- SchemaElementDecl.cs
- DataGridViewCellPaintingEventArgs.cs
- DataGridTableStyleMappingNameEditor.cs
- Span.cs
- InertiaRotationBehavior.cs
- Cursor.cs
- CancelRequestedRecord.cs
- EncoderExceptionFallback.cs
- HttpDigestClientCredential.cs
- AuthorizationSection.cs
- TextTreeNode.cs
- RepeatButtonAutomationPeer.cs
- BackEase.cs
- WindowsServiceCredential.cs
- NamedPipeAppDomainProtocolHandler.cs
- SkewTransform.cs
- CultureInfo.cs
- Visual3DCollection.cs
- MergeLocalizationDirectives.cs
- CapabilitiesRule.cs
- SqlHelper.cs
- InvalidPrinterException.cs
- WebPartPersonalization.cs
- FolderNameEditor.cs
- StorageEntityContainerMapping.cs
- GridViewHeaderRowPresenter.cs
- DBCSCodePageEncoding.cs
- DataControlButton.cs
- UnmanagedHandle.cs
- ErrorLog.cs
- Component.cs
- OracleFactory.cs
- SqlTopReducer.cs
- DifferencingCollection.cs
- StickyNoteAnnotations.cs
- SqlDataReaderSmi.cs
- BinarySecretSecurityToken.cs
- LiteralControl.cs
- GlobalDataBindingHandler.cs
- InputLanguageEventArgs.cs
- XmlEntityReference.cs
- Rules.cs
- SByteConverter.cs
- BmpBitmapDecoder.cs
- PrimitiveSchema.cs
- fixedPageContentExtractor.cs
- SplineKeyFrames.cs
- WebPartEditVerb.cs
- DbModificationClause.cs
- Automation.cs
- PasswordPropertyTextAttribute.cs