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
- PersistenceTypeAttribute.cs
- Separator.cs
- DataGridViewCellToolTipTextNeededEventArgs.cs
- RemotingConfiguration.cs
- PersistChildrenAttribute.cs
- GridViewCellAutomationPeer.cs
- FontNameEditor.cs
- XmlQueryType.cs
- HtmlTitle.cs
- NullReferenceException.cs
- SQLStringStorage.cs
- CodeSubDirectory.cs
- ModelItem.cs
- CreatingCookieEventArgs.cs
- WebPartConnectionsCloseVerb.cs
- AsymmetricKeyExchangeFormatter.cs
- FaultFormatter.cs
- WindowsFormsHostPropertyMap.cs
- SmiTypedGetterSetter.cs
- PointAnimationClockResource.cs
- _ContextAwareResult.cs
- SmiContext.cs
- DrawListViewColumnHeaderEventArgs.cs
- WebPartEditorCancelVerb.cs
- BuiltInExpr.cs
- TaskExtensions.cs
- FileLogRecordEnumerator.cs
- RequestNavigateEventArgs.cs
- Animatable.cs
- HttpClientProtocol.cs
- CodeIndexerExpression.cs
- DatagridviewDisplayedBandsData.cs
- UnmanagedMarshal.cs
- CqlLexer.cs
- DataGridViewColumnHeaderCell.cs
- WebPartConnectionsCancelEventArgs.cs
- DuplicateMessageDetector.cs
- FixedSOMGroup.cs
- WebServiceData.cs
- SecurityCapabilities.cs
- AnnotationComponentChooser.cs
- DataServiceRequestException.cs
- GridSplitterAutomationPeer.cs
- DataGridViewButtonColumn.cs
- Operators.cs
- EntityCollection.cs
- TypeToken.cs
- InputProviderSite.cs
- TypeConvertions.cs
- SchemaCollectionPreprocessor.cs
- Context.cs
- Part.cs
- control.ime.cs
- IndexerNameAttribute.cs
- Assert.cs
- ACE.cs
- ConfigXmlText.cs
- shaperfactory.cs
- FieldBuilder.cs
- DataGridCellItemAutomationPeer.cs
- DbCommandDefinition.cs
- InlineObject.cs
- safemediahandle.cs
- ValueTypeFixupInfo.cs
- RegexNode.cs
- DbConnectionPool.cs
- XmlIlVisitor.cs
- RectKeyFrameCollection.cs
- DataGridViewColumnCollectionEditor.cs
- DiscriminatorMap.cs
- WSFederationHttpBinding.cs
- KnownBoxes.cs
- Stack.cs
- AssemblyAttributes.cs
- DecimalAnimationUsingKeyFrames.cs
- ControlCachePolicy.cs
- HtmlImageAdapter.cs
- ShaperBuffers.cs
- ObjectTag.cs
- CompensationExtension.cs
- codemethodreferenceexpression.cs
- PrivateFontCollection.cs
- TakeOrSkipWhileQueryOperator.cs
- QueueException.cs
- CodeStatementCollection.cs
- SqlPersonalizationProvider.cs
- FormViewModeEventArgs.cs
- PropertyIDSet.cs
- UnsafeNativeMethods.cs
- HitTestFilterBehavior.cs
- VarInfo.cs
- TripleDES.cs
- TableParagraph.cs
- EdgeProfileValidation.cs
- FixUp.cs
- FirstMatchCodeGroup.cs
- XmlDocumentType.cs
- _CookieModule.cs
- XmlTextAttribute.cs
- DrawListViewItemEventArgs.cs