Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Extensions / UI / EmptyStringExpandableObjectConverter.cs / 1305376 / EmptyStringExpandableObjectConverter.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI { using System; using System.ComponentModel; using System.Globalization; // Used by objects that are subproperties of Controls. Improves the UI in the property grid by displaying // nothing as the property value, instead of the fully qualified type name. internal sealed class EmptyStringExpandableObjectConverter : ExpandableObjectConverter { public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) { if (destinationType == typeof(string)) { return String.Empty; } else { return base.ConvertTo(context, culture, value, destinationType); } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI { using System; using System.ComponentModel; using System.Globalization; // Used by objects that are subproperties of Controls. Improves the UI in the property grid by displaying // nothing as the property value, instead of the fully qualified type name. internal sealed class EmptyStringExpandableObjectConverter : ExpandableObjectConverter { public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) { if (destinationType == typeof(string)) { return String.Empty; } else { return base.ConvertTo(context, culture, value, destinationType); } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SaveFileDialogDesigner.cs
- ReplyChannelAcceptor.cs
- ValueSerializer.cs
- BitmapEffectDrawingContextWalker.cs
- UserControl.cs
- DSASignatureDeformatter.cs
- Constants.cs
- Globals.cs
- TemplateControlBuildProvider.cs
- iisPickupDirectory.cs
- ParamArrayAttribute.cs
- backend.cs
- ToolStripDropDown.cs
- AggregateNode.cs
- BoolLiteral.cs
- FixedDocumentPaginator.cs
- UpdateProgress.cs
- CodeThrowExceptionStatement.cs
- SystemKeyConverter.cs
- WindowsGraphics.cs
- ScopelessEnumAttribute.cs
- Clock.cs
- ScriptMethodAttribute.cs
- ReferentialConstraint.cs
- UpdateCompiler.cs
- CollectionViewSource.cs
- TypeElement.cs
- IndexedEnumerable.cs
- SrgsGrammar.cs
- DataControlFieldCollection.cs
- HyperLinkStyle.cs
- WebBrowserHelper.cs
- SqlNodeTypeOperators.cs
- ToolBar.cs
- DataServiceEntityAttribute.cs
- DesignerVerbCollection.cs
- DesignerToolStripControlHost.cs
- GridViewCellAutomationPeer.cs
- DbConnectionInternal.cs
- UserControlDocumentDesigner.cs
- RangeValuePattern.cs
- DesignerAutoFormat.cs
- IndexerNameAttribute.cs
- LockedBorderGlyph.cs
- safex509handles.cs
- DataTableReader.cs
- SizeChangedInfo.cs
- SubMenuStyleCollection.cs
- TableRow.cs
- UInt32.cs
- XmlElementList.cs
- Asn1IntegerConverter.cs
- AttributeData.cs
- XmlDocumentType.cs
- UnsafeNativeMethods.cs
- XmlSchemaExternal.cs
- DockingAttribute.cs
- ProgressiveCrcCalculatingStream.cs
- SecurityVerifiedMessage.cs
- CodeDefaultValueExpression.cs
- ValueProviderWrapper.cs
- Underline.cs
- DataGridViewUtilities.cs
- ConfigurationManagerInternal.cs
- XmlILCommand.cs
- OleAutBinder.cs
- LowerCaseStringConverter.cs
- JsonFormatGeneratorStatics.cs
- IResourceProvider.cs
- VisualBrush.cs
- ZoneIdentityPermission.cs
- RadioButtonRenderer.cs
- GeneralTransform3DGroup.cs
- OleDbDataAdapter.cs
- Privilege.cs
- CDSsyncETWBCLProvider.cs
- Form.cs
- MatrixIndependentAnimationStorage.cs
- HttpDigestClientCredential.cs
- HwndKeyboardInputProvider.cs
- ContextStack.cs
- XmlWriterTraceListener.cs
- SqlPersonalizationProvider.cs
- UserControl.cs
- UDPClient.cs
- IntPtr.cs
- Margins.cs
- EntityDataSourceWrapperCollection.cs
- XmlObjectSerializerWriteContext.cs
- DefaultParameterValueAttribute.cs
- LazyLoadBehavior.cs
- SmiConnection.cs
- ScriptResourceHandler.cs
- ZipIOBlockManager.cs
- DbProviderSpecificTypePropertyAttribute.cs
- safelink.cs
- InvalidOleVariantTypeException.cs
- MatrixAnimationBase.cs
- AtomContentProperty.cs
- Utils.cs