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
- DebugInfoGenerator.cs
- QueryCacheManager.cs
- BindingContext.cs
- TheQuery.cs
- HtmlLiteralTextAdapter.cs
- TextBoxLine.cs
- FlowDocument.cs
- EventWaitHandle.cs
- AutoResetEvent.cs
- WeakEventTable.cs
- SecureUICommand.cs
- DummyDataSource.cs
- JapaneseCalendar.cs
- GridViewDeleteEventArgs.cs
- DataListDesigner.cs
- SQLString.cs
- PropertyDescriptorComparer.cs
- AlgoModule.cs
- CertificateReferenceElement.cs
- embossbitmapeffect.cs
- ManagedIStream.cs
- XpsDocument.cs
- ReturnValue.cs
- MimeObjectFactory.cs
- ReferencedAssembly.cs
- ShaperBuffers.cs
- XmlQueryRuntime.cs
- SamlSubject.cs
- XmlUrlResolver.cs
- StorageEntitySetMapping.cs
- VerificationAttribute.cs
- ListViewVirtualItemsSelectionRangeChangedEvent.cs
- LogicalExpr.cs
- ProfileEventArgs.cs
- DispatcherHookEventArgs.cs
- DataControlFieldCollection.cs
- GlyphRunDrawing.cs
- Panel.cs
- ProtectedConfigurationSection.cs
- XmlSchemaSimpleTypeRestriction.cs
- XamlReader.cs
- XmlQueryContext.cs
- XmlAttribute.cs
- DetailsViewPagerRow.cs
- SizeValueSerializer.cs
- _HelperAsyncResults.cs
- ObjectViewQueryResultData.cs
- StorageScalarPropertyMapping.cs
- RequestCachingSection.cs
- WeakReferenceList.cs
- TextOnlyOutput.cs
- ProtocolViolationException.cs
- ProcessInfo.cs
- HwndSource.cs
- IODescriptionAttribute.cs
- SQLInt16Storage.cs
- DirectionalLight.cs
- MutexSecurity.cs
- HttpRequestTraceRecord.cs
- SerializationInfoEnumerator.cs
- AccessKeyManager.cs
- GridViewColumnCollection.cs
- ProviderConnectionPointCollection.cs
- InvalidPropValue.cs
- ViewGenerator.cs
- ZipIOFileItemStream.cs
- Attributes.cs
- ApplicationBuildProvider.cs
- DataBoundLiteralControl.cs
- ControlBuilderAttribute.cs
- storepermission.cs
- ContainerVisual.cs
- GPPOINTF.cs
- VariableModifiersHelper.cs
- DocumentOrderQuery.cs
- InputProviderSite.cs
- MethodImplAttribute.cs
- DateTimeConverter2.cs
- CounterCreationDataCollection.cs
- XmlToDatasetMap.cs
- SqlResolver.cs
- XmlSchemaAnnotated.cs
- DataTableMappingCollection.cs
- SystemIPGlobalProperties.cs
- CalendarBlackoutDatesCollection.cs
- ZoomPercentageConverter.cs
- StructuredTypeInfo.cs
- JsonQueryStringConverter.cs
- MappedMetaModel.cs
- IsolatedStorageFilePermission.cs
- Clipboard.cs
- ImageBrush.cs
- UTF32Encoding.cs
- MsmqTransportBindingElement.cs
- FocusTracker.cs
- bindurihelper.cs
- ADConnectionHelper.cs
- ScaleTransform3D.cs
- Int64KeyFrameCollection.cs
- Logging.cs