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
- Error.cs
- TextElementEditingBehaviorAttribute.cs
- DesignBindingValueUIHandler.cs
- ScriptingProfileServiceSection.cs
- BlockUIContainer.cs
- PageContent.cs
- BooleanFacetDescriptionElement.cs
- AnimationClock.cs
- QualificationDataItem.cs
- ChangesetResponse.cs
- DragDropManager.cs
- HtmlTernaryTree.cs
- LazyTextWriterCreator.cs
- DataRowView.cs
- Fonts.cs
- SmtpNetworkElement.cs
- InvalidComObjectException.cs
- WebPartMenuStyle.cs
- RegularExpressionValidator.cs
- IgnoreFlushAndCloseStream.cs
- IQueryable.cs
- X509Extension.cs
- SafeHGlobalHandleCritical.cs
- EntityDataSourceWrapperPropertyDescriptor.cs
- IisTraceListener.cs
- ToolStripScrollButton.cs
- CalendarKeyboardHelper.cs
- HttpBrowserCapabilitiesWrapper.cs
- Char.cs
- Vector3DCollection.cs
- CompilationUtil.cs
- DataFormat.cs
- unsafeIndexingFilterStream.cs
- HttpRuntime.cs
- DLinqColumnProvider.cs
- SystemTcpStatistics.cs
- DatePickerAutomationPeer.cs
- jithelpers.cs
- DirectoryObjectSecurity.cs
- Page.cs
- PolyLineSegment.cs
- Button.cs
- Transaction.cs
- DesignerLoader.cs
- RuleElement.cs
- RightsManagementEncryptedStream.cs
- TabPanel.cs
- XPathSelectionIterator.cs
- AddressHeader.cs
- PathParser.cs
- VerificationException.cs
- Size3DConverter.cs
- DataGridViewButtonCell.cs
- EventLog.cs
- ResourceManager.cs
- FormatSettings.cs
- TraceContext.cs
- WindowsEditBoxRange.cs
- CodeDomSerializationProvider.cs
- AppDomainUnloadedException.cs
- TextBoxBase.cs
- GraphicsPathIterator.cs
- ComplexLine.cs
- InputLanguageEventArgs.cs
- XmlWrappingReader.cs
- IsolatedStoragePermission.cs
- CodeNamespaceImport.cs
- Typeface.cs
- OutOfProcStateClientManager.cs
- Serializer.cs
- ExecutedRoutedEventArgs.cs
- ImageFormat.cs
- DataTableMappingCollection.cs
- KeyEventArgs.cs
- ContainsRowNumberChecker.cs
- Dispatcher.cs
- ListQueryResults.cs
- KeyEvent.cs
- Parsers.cs
- ComponentSerializationService.cs
- XmlNullResolver.cs
- SendMailErrorEventArgs.cs
- ContentValidator.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- DataGridViewRowsAddedEventArgs.cs
- CustomWebEventKey.cs
- PersonalizationEntry.cs
- EncoderBestFitFallback.cs
- PropVariant.cs
- Menu.cs
- SQLByteStorage.cs
- CriticalFileToken.cs
- Main.cs
- EdmEntityTypeAttribute.cs
- MaterialCollection.cs
- sqlser.cs
- XmlParserContext.cs
- RelationshipEnd.cs
- WindowsImpersonationContext.cs
- IIS7UserPrincipal.cs