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
- SqlPersistenceProviderFactory.cs
- CoTaskMemUnicodeSafeHandle.cs
- SafeNativeMethods.cs
- XamlSerializationHelper.cs
- HttpProcessUtility.cs
- NameValueCollection.cs
- SystemNetworkInterface.cs
- HtmlTableRowCollection.cs
- SimpleWebHandlerParser.cs
- FormViewDesigner.cs
- ConnectionPointCookie.cs
- WebPartConnectionsCloseVerb.cs
- QilName.cs
- CounterSetInstance.cs
- HtmlTextArea.cs
- UnicodeEncoding.cs
- HtmlInputControl.cs
- TargetControlTypeCache.cs
- DataGridItemCollection.cs
- StrokeCollection.cs
- ServiceModelActivity.cs
- SslStream.cs
- ImmutableObjectAttribute.cs
- XmlQueryRuntime.cs
- StaticFileHandler.cs
- Certificate.cs
- WaitHandle.cs
- DynamicDocumentPaginator.cs
- PropertyDescriptorComparer.cs
- SpeechAudioFormatInfo.cs
- UInt64.cs
- BeginStoryboard.cs
- File.cs
- DeferrableContent.cs
- SHA384.cs
- DataGridViewCellEventArgs.cs
- WpfSharedXamlSchemaContext.cs
- AxHostDesigner.cs
- HtmlFormParameterWriter.cs
- HScrollBar.cs
- KeySpline.cs
- AutomationFocusChangedEventArgs.cs
- RangeEnumerable.cs
- BaseServiceProvider.cs
- PropertyChangedEventManager.cs
- TextParagraphView.cs
- RuleDefinitions.cs
- PriorityQueue.cs
- ForEachAction.cs
- DeflateStream.cs
- ColumnTypeConverter.cs
- NamespaceTable.cs
- ConnectionConsumerAttribute.cs
- ContentDisposition.cs
- DataView.cs
- RuntimeEnvironment.cs
- WebPartCollection.cs
- PageResolution.cs
- RegexGroup.cs
- ListControlConvertEventArgs.cs
- ExeConfigurationFileMap.cs
- DynamicEndpointElement.cs
- RoutedEventConverter.cs
- Compiler.cs
- MessageLoggingElement.cs
- IncrementalReadDecoders.cs
- ResourceType.cs
- XsltQilFactory.cs
- RijndaelManagedTransform.cs
- CompositeCollectionView.cs
- VectorCollectionConverter.cs
- SafeEventHandle.cs
- CodeParameterDeclarationExpression.cs
- EastAsianLunisolarCalendar.cs
- TreeNodeStyle.cs
- MenuItem.cs
- DefaultEventAttribute.cs
- HtmlDocument.cs
- DataTableMapping.cs
- RegexMatch.cs
- _DynamicWinsockMethods.cs
- PathFigure.cs
- MemberHolder.cs
- ServiceDescription.cs
- StorageMappingItemLoader.cs
- MimeTypeMapper.cs
- CompatibleIComparer.cs
- Metafile.cs
- GeneralTransform3D.cs
- HierarchicalDataBoundControl.cs
- UserControlBuildProvider.cs
- EdmProperty.cs
- CodeDelegateInvokeExpression.cs
- SerializationInfo.cs
- ToolStripSeparator.cs
- ObjRef.cs
- ViewGenerator.cs
- XMLUtil.cs
- DoubleStorage.cs
- GradientStopCollection.cs