Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Base / System / Windows / Markup / TypeTypeConverter.cs / 1305600 / TypeTypeConverter.cs
/****************************************************************************\ * * File: DateTimeConverter2.cs * \***************************************************************************/ using System; using System.ComponentModel; #if PBTCOMPILER namespace MS.Internal.Markup #else namespace System.Windows.Markup #endif { ////// TypeConverter for System.Type /// internal class TypeTypeConverter : TypeConverter { #if !PBTCOMPILER public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) { return sourceType == typeof(string); } public override object ConvertFrom(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) { string typeName = value as string; if (null != context && typeName != null) { IXamlTypeResolver xamlTypeResolver = (IXamlTypeResolver)context.GetService(typeof(IXamlTypeResolver)); if (null != xamlTypeResolver) { return xamlTypeResolver.Resolve(typeName); } } return base.ConvertFrom(context, culture, value); } #endif } } // 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
- StorageTypeMapping.cs
- IDispatchConstantAttribute.cs
- KeyInterop.cs
- FixUpCollection.cs
- AssemblyBuilderData.cs
- TextMessageEncodingElement.cs
- XmlILCommand.cs
- TextEditorSpelling.cs
- ServiceOperationUIEditor.cs
- InteropAutomationProvider.cs
- ManipulationDelta.cs
- CompositeCollectionView.cs
- XmlSchemaCollection.cs
- UserControlBuildProvider.cs
- ReflectionTypeLoadException.cs
- PropertyEmitter.cs
- ObjectDataSourceView.cs
- DynamicILGenerator.cs
- SQLUtility.cs
- LinearGradientBrush.cs
- Stopwatch.cs
- SqlBooleanMismatchVisitor.cs
- EventBuilder.cs
- _Win32.cs
- ToolStripOverflowButton.cs
- StatusBarItem.cs
- Int32Storage.cs
- UnsafeNativeMethods.cs
- DockPattern.cs
- HtmlShimManager.cs
- Trigger.cs
- PropertyIDSet.cs
- CacheEntry.cs
- securitycriticaldata.cs
- LogFlushAsyncResult.cs
- DashStyle.cs
- TimelineCollection.cs
- TraceSource.cs
- WSTrustFeb2005.cs
- IdentityHolder.cs
- FixedSOMContainer.cs
- CatalogPartCollection.cs
- ExpandSegmentCollection.cs
- XmlSchemaInferenceException.cs
- ServiceModelConfigurationSectionGroup.cs
- LogicalExpr.cs
- CompiledQuery.cs
- SecureConversationDriver.cs
- Utility.cs
- SyndicationContent.cs
- followingquery.cs
- BitmapEncoder.cs
- ProgressBarAutomationPeer.cs
- PropertyMap.cs
- TabControl.cs
- DiscoveryReferences.cs
- ToolStripDropDownDesigner.cs
- RangeValuePattern.cs
- CatalogZoneAutoFormat.cs
- FixedPageStructure.cs
- WebPartsPersonalization.cs
- TrackingProfileDeserializationException.cs
- CompositeControl.cs
- EventDescriptor.cs
- TypeDescriptorContext.cs
- BinaryParser.cs
- XmlLangPropertyAttribute.cs
- ReadOnlyCollection.cs
- Attributes.cs
- ParallelTimeline.cs
- CodePageUtils.cs
- EncodingStreamWrapper.cs
- WorkflowInstanceRecord.cs
- Attributes.cs
- TemplateField.cs
- PlatformCulture.cs
- ModifyActivitiesPropertyDescriptor.cs
- PrinterUnitConvert.cs
- ExecutionEngineException.cs
- SqlDeflator.cs
- OleDbError.cs
- Polygon.cs
- SspiSafeHandles.cs
- safesecurityhelperavalon.cs
- XmlEncoding.cs
- ServiceDebugBehavior.cs
- ExtendedTransformFactory.cs
- NoPersistScope.cs
- Quad.cs
- WindowsRegion.cs
- MimeImporter.cs
- ToolStripHighContrastRenderer.cs
- ToolTipAutomationPeer.cs
- ListControl.cs
- WorkflowEventArgs.cs
- XmlComment.cs
- QueryCacheKey.cs
- DurableMessageDispatchInspector.cs
- MessagePartDescription.cs
- SchemaTypeEmitter.cs