Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Base / System / Windows / ExpressionConverter.cs / 1 / 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
- DecimalAnimationBase.cs
- SoapException.cs
- StringUtil.cs
- HyperLink.cs
- ConfigXmlCDataSection.cs
- SqlDataAdapter.cs
- DocumentReference.cs
- Currency.cs
- KeyValueConfigurationElement.cs
- Rules.cs
- FactoryMaker.cs
- ConfigurationLocation.cs
- DoubleStorage.cs
- RowVisual.cs
- SqlNodeAnnotation.cs
- ButtonField.cs
- CompilationLock.cs
- ToolStripGrip.cs
- HelpProvider.cs
- RNGCryptoServiceProvider.cs
- CodeTypeDelegate.cs
- BaseResourcesBuildProvider.cs
- RectangleGeometry.cs
- SafeFindHandle.cs
- EmptyReadOnlyDictionaryInternal.cs
- versioninfo.cs
- MasterPageBuildProvider.cs
- ClusterRegistryConfigurationProvider.cs
- ObjectComplexPropertyMapping.cs
- ViewManagerAttribute.cs
- HttpSocketManager.cs
- BezierSegment.cs
- NavigationPropertyAccessor.cs
- URLIdentityPermission.cs
- SystemWebCachingSectionGroup.cs
- HttpHandlerAction.cs
- TextTreeRootNode.cs
- connectionpool.cs
- TextFormatterHost.cs
- CategoryEditor.cs
- _NegoState.cs
- VectorConverter.cs
- XmlnsCache.cs
- HostingPreferredMapPath.cs
- SharedPerformanceCounter.cs
- TriState.cs
- HealthMonitoringSectionHelper.cs
- StringOutput.cs
- EllipticalNodeOperations.cs
- UserInitiatedNavigationPermission.cs
- FileSystemWatcher.cs
- EntityTypeBase.cs
- TemplateBamlRecordReader.cs
- ValidationEventArgs.cs
- CapabilitiesState.cs
- DeflateStream.cs
- SHA1CryptoServiceProvider.cs
- TextDecorationCollection.cs
- ForAllOperator.cs
- SettingsAttributeDictionary.cs
- MutexSecurity.cs
- SystemWebExtensionsSectionGroup.cs
- SystemUdpStatistics.cs
- TransformCryptoHandle.cs
- ImageSourceConverter.cs
- InlineUIContainer.cs
- XmlMapping.cs
- ValueUnavailableException.cs
- SapiInterop.cs
- HeaderedContentControl.cs
- SafeSecurityHandles.cs
- LockCookie.cs
- ValidationUtility.cs
- CategoryList.cs
- SafeFileMappingHandle.cs
- GradientStop.cs
- ChangesetResponse.cs
- ChannelSinkStacks.cs
- InstanceDataCollectionCollection.cs
- Brush.cs
- List.cs
- oledbmetadatacollectionnames.cs
- XmlSerializationReader.cs
- EntityAdapter.cs
- CompatibleIComparer.cs
- DateTimeAutomationPeer.cs
- SoapIncludeAttribute.cs
- ColorAnimationUsingKeyFrames.cs
- Int64AnimationUsingKeyFrames.cs
- CallbackHandler.cs
- DataGridRelationshipRow.cs
- BrowserTree.cs
- LoadRetryStrategyFactory.cs
- NotFiniteNumberException.cs
- WeakEventManager.cs
- ErasingStroke.cs
- GenericQueueSurrogate.cs
- UniqueIdentifierService.cs
- ToolTip.cs
- IODescriptionAttribute.cs