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
- RequestBringIntoViewEventArgs.cs
- ListComponentEditor.cs
- XsltFunctions.cs
- HtmlInputImage.cs
- StateMachineHelpers.cs
- DragDrop.cs
- MouseEvent.cs
- CompositeActivityTypeDescriptor.cs
- CompilationRelaxations.cs
- SqlNodeAnnotations.cs
- TextEditorDragDrop.cs
- SoapExtensionTypeElement.cs
- MethodImplAttribute.cs
- TextComposition.cs
- CodeDomSerializerBase.cs
- UserThread.cs
- HttpHandlersSection.cs
- EdmItemError.cs
- ListBox.cs
- xmlfixedPageInfo.cs
- MD5Cng.cs
- ExcCanonicalXml.cs
- UrlPath.cs
- DataViewManagerListItemTypeDescriptor.cs
- ProfileParameter.cs
- TextEditorThreadLocalStore.cs
- CustomValidator.cs
- WebMessageEncodingBindingElement.cs
- DataGridViewSelectedColumnCollection.cs
- CellRelation.cs
- SkinBuilder.cs
- MimeTypeAttribute.cs
- _ConnectStream.cs
- StatusBarPanel.cs
- ClientScriptManagerWrapper.cs
- CompilerInfo.cs
- AnnotationObservableCollection.cs
- TextParentUndoUnit.cs
- RoleGroupCollection.cs
- PersistenceProviderElement.cs
- CaretElement.cs
- VectorValueSerializer.cs
- Errors.cs
- HelpKeywordAttribute.cs
- Models.cs
- SendContent.cs
- Privilege.cs
- ExceptionHandler.cs
- WmlSelectionListAdapter.cs
- StrokeIntersection.cs
- AdobeCFFWrapper.cs
- TextElementEnumerator.cs
- COAUTHIDENTITY.cs
- LoginUtil.cs
- _NativeSSPI.cs
- DrawToolTipEventArgs.cs
- DataViewListener.cs
- UnsafeNativeMethodsPenimc.cs
- FormViewInsertEventArgs.cs
- ModelUtilities.cs
- Point.cs
- URLString.cs
- Storyboard.cs
- DefaultMemberAttribute.cs
- SaveFileDialog.cs
- ResourceDisplayNameAttribute.cs
- datacache.cs
- WindowClosedEventArgs.cs
- BindingElement.cs
- SQLSingleStorage.cs
- DataGridPageChangedEventArgs.cs
- RepeaterDataBoundAdapter.cs
- SelectedDatesCollection.cs
- PingOptions.cs
- UriExt.cs
- PassportAuthenticationEventArgs.cs
- CharacterMetricsDictionary.cs
- CodeDirectionExpression.cs
- XmlObjectSerializerReadContextComplexJson.cs
- RenderDataDrawingContext.cs
- DataControlImageButton.cs
- DesignTimeVisibleAttribute.cs
- MetadataException.cs
- TimeManager.cs
- SequenceFullException.cs
- ObjectParameter.cs
- PersonalizableTypeEntry.cs
- DataGridColumnCollection.cs
- PropertyEmitterBase.cs
- ByteStreamBufferedMessageData.cs
- XPathNodeHelper.cs
- MsmqHostedTransportManager.cs
- TreeNodeCollection.cs
- DropSourceBehavior.cs
- EdgeProfileValidation.cs
- errorpatternmatcher.cs
- COM2PropertyDescriptor.cs
- DetailsViewPageEventArgs.cs
- ListViewInsertEventArgs.cs
- ByteFacetDescriptionElement.cs