Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Base / System / Windows / ExpressionConverter.cs / 1305600 / ExpressionConverter.cs
//---------------------------------------------------------------------------- // // File: ExpressionConverter.cs // // Description: // TypeConverter for a generic property value expression // // Copyright (C) 2003 by Microsoft Corporation. All rights reserved. // //--------------------------------------------------------------------------- using System; using System.ComponentModel; using System.Globalization; using System.ComponentModel.Design.Serialization; namespace System.Windows { ////// TypeConverter for a generic property value expression /// ////// The cole purpose of this TypeConveret is to block the /// default TypeConverter/ ToString() behavior /// public class ExpressionConverter : TypeConverter { ////// TypeConverter method override. /// /// /// ITypeDescriptorContext /// /// /// Type to convert from /// ////// true if conversion is possible /// public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) { return false; } ////// TypeConverter method override. /// /// /// ITypeDescriptorContext /// /// /// Type to convert to /// ////// true if conversion is possible /// public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) { return false; } ////// TypeConverter method implementation. /// /// /// ITypeDescriptorContext /// /// /// current culture (see CLR specs) /// /// /// value to convert from /// ////// value that is result of conversion /// public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) { throw GetConvertFromException(value); } ////// TypeConverter method implementation. /// /// /// ITypeDescriptorContext /// /// /// current culture (see CLR specs) /// /// /// value to convert from /// /// /// Type to convert to /// ////// converted value /// public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) { throw GetConvertToException(value, destinationType); } } } // 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
- HttpHandlerActionCollection.cs
- ConfigurationException.cs
- Atom10FormatterFactory.cs
- BaseCAMarshaler.cs
- HtmlInputPassword.cs
- LocatorManager.cs
- TypeSystem.cs
- BuildManagerHost.cs
- GifBitmapDecoder.cs
- UInt32Converter.cs
- GenerateTemporaryTargetAssembly.cs
- NamedPipeTransportBindingElement.cs
- AutomationPeer.cs
- SearchForVirtualItemEventArgs.cs
- OleDbErrorCollection.cs
- XmlSchemaSimpleType.cs
- PolicyLevel.cs
- CustomAttribute.cs
- UnsafeNativeMethods.cs
- FtpWebResponse.cs
- WindowsBrush.cs
- DWriteFactory.cs
- ExpressionBuilder.cs
- CustomError.cs
- Utils.cs
- BufferModeSettings.cs
- Int32CollectionValueSerializer.cs
- TypeDescriptionProvider.cs
- XPathScanner.cs
- GeneratedContractType.cs
- PointLightBase.cs
- WindowsAuthenticationEventArgs.cs
- AuthenticatedStream.cs
- TcpTransportElement.cs
- ConfigurationElement.cs
- IdnElement.cs
- CustomWebEventKey.cs
- ConnectionStringSettingsCollection.cs
- BlurEffect.cs
- TypeLibConverter.cs
- TimeoutException.cs
- BindValidationContext.cs
- DesignTimeVisibleAttribute.cs
- TypeSystemProvider.cs
- GroupItemAutomationPeer.cs
- HTMLTextWriter.cs
- ImageFormat.cs
- WinEventQueueItem.cs
- TitleStyle.cs
- ListItemConverter.cs
- ClosableStream.cs
- CannotUnloadAppDomainException.cs
- AlphaSortedEnumConverter.cs
- UserControlCodeDomTreeGenerator.cs
- FileRecordSequenceHelper.cs
- HorizontalAlignConverter.cs
- MenuItemBinding.cs
- TrustLevelCollection.cs
- IndependentlyAnimatedPropertyMetadata.cs
- ImportFileRequest.cs
- FlowNode.cs
- GregorianCalendarHelper.cs
- UserMapPath.cs
- SafeEventLogWriteHandle.cs
- CustomWebEventKey.cs
- OneWayChannelListener.cs
- PerformanceCounterPermissionEntryCollection.cs
- TagPrefixInfo.cs
- StreamGeometry.cs
- MultiView.cs
- AuthenticationSection.cs
- StringResourceManager.cs
- ModelItem.cs
- ComponentDispatcherThread.cs
- GlyphRun.cs
- BamlTreeUpdater.cs
- PackageRelationshipCollection.cs
- Literal.cs
- figurelengthconverter.cs
- Relationship.cs
- CopyNodeSetAction.cs
- Relationship.cs
- Queue.cs
- WindowsFormsLinkLabel.cs
- _FtpDataStream.cs
- PrintEvent.cs
- PageThemeCodeDomTreeGenerator.cs
- SqlTopReducer.cs
- XmlSchemaAttributeGroup.cs
- XPathNode.cs
- HtmlWindowCollection.cs
- StyleHelper.cs
- Size3D.cs
- StrokeCollection2.cs
- DescendentsWalkerBase.cs
- XmlBaseWriter.cs
- CodeNamespace.cs
- GlobalizationAssembly.cs
- StagingAreaInputItem.cs
- SizeIndependentAnimationStorage.cs