Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / Markup / TemplateKeyConverter.cs / 1305600 / TemplateKeyConverter.cs
/****************************************************************************\ * * File: TemplateKeyConverter.cs * * Class for converting a given TemplateKey to a string * * Copyright (C) 2005 by Microsoft Corporation. All rights reserved. * \***************************************************************************/ using System; using System.ComponentModel; // for TypeConverter using System.Globalization; // for CultureInfo using System.Reflection; using MS.Utility; using MS.Internal; using System.Windows; using System.ComponentModel.Design.Serialization; using System.Windows.Documents; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings namespace System.Windows.Markup { ////// Class for converting a given TemplateKey to a string /// public sealed class TemplateKeyConverter : TypeConverter { #region Public Methods ////// CanConvertFrom() /// /// ITypeDescriptorContext /// type to convert from ///true if the given type can be converted, flase otherwise 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; } ////// ConvertFrom() -TypeConverter method override. using the givein name to return DependencyProperty /// /// ITypeDescriptorContext /// CultureInfo /// Object to convert from ///instance of Command public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object source) { throw GetConvertFromException(source); } ////// ConvertTo() - Serialization purposes, returns the string from Command.Name by adding ownerType.FullName /// /// ITypeDescriptorContext /// CultureInfo /// the object to convert from /// the type to convert to ///string object, if the destination type is string public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) { throw GetConvertToException(value, destinationType); } #endregion Public Methods } } // 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
- ModelItemKeyValuePair.cs
- XmlObjectSerializerReadContextComplexJson.cs
- WebPartVerb.cs
- TrackBarRenderer.cs
- TableCell.cs
- Quaternion.cs
- EventLogPermissionEntryCollection.cs
- UnsafeNativeMethods.cs
- Switch.cs
- GeometryHitTestResult.cs
- BaseCollection.cs
- XmlnsCompatibleWithAttribute.cs
- Int32CollectionValueSerializer.cs
- ConfigurationSettings.cs
- ReflectionUtil.cs
- WebBaseEventKeyComparer.cs
- QuaternionAnimation.cs
- TransformerInfo.cs
- SettingsBindableAttribute.cs
- XmlWellformedWriter.cs
- SmtpFailedRecipientsException.cs
- TransformGroup.cs
- PriorityChain.cs
- PolyBezierSegmentFigureLogic.cs
- MatrixAnimationBase.cs
- EntityDataSourceWrapperCollection.cs
- GcSettings.cs
- PropertyFilter.cs
- XPathDocumentIterator.cs
- RadioButtonStandardAdapter.cs
- RequestStatusBarUpdateEventArgs.cs
- ScrollChrome.cs
- RoleService.cs
- InfoCardRSACryptoProvider.cs
- GridViewUpdateEventArgs.cs
- TypeGeneratedEventArgs.cs
- ProfileSection.cs
- MessageBox.cs
- AssemblyFilter.cs
- SqlTriggerContext.cs
- SourceItem.cs
- TemplatePagerField.cs
- OperatingSystem.cs
- UnionCqlBlock.cs
- RequiredAttributeAttribute.cs
- CodeConstructor.cs
- RuleProcessor.cs
- ImageDrawing.cs
- DataSourceHelper.cs
- TextEditorDragDrop.cs
- MergeLocalizationDirectives.cs
- LayoutSettings.cs
- Coordinator.cs
- XmlCharCheckingWriter.cs
- XmlSiteMapProvider.cs
- ToolStripDropDownItem.cs
- SystemException.cs
- GetWinFXPath.cs
- KeyFrames.cs
- FontInfo.cs
- ISO2022Encoding.cs
- WorkflowIdleElement.cs
- ApplicationBuildProvider.cs
- DependencyPropertyValueSerializer.cs
- EmissiveMaterial.cs
- IdentityManager.cs
- ThumbButtonInfoCollection.cs
- ClientEventManager.cs
- EntityParameter.cs
- WebSysDefaultValueAttribute.cs
- GlobalAclOperationRequirement.cs
- XmlSchemaType.cs
- handlecollector.cs
- View.cs
- IPCCacheManager.cs
- CodeAttributeArgumentCollection.cs
- CellParagraph.cs
- Adorner.cs
- DataGridComponentEditor.cs
- PlanCompiler.cs
- CryptoHandle.cs
- TypeInfo.cs
- PointAnimationUsingPath.cs
- PixelFormats.cs
- PropertyIDSet.cs
- WorkflowDataContext.cs
- Int32RectConverter.cs
- SqlDelegatedTransaction.cs
- FormattedTextSymbols.cs
- ResolveNextArgumentWorkItem.cs
- FlowDocumentScrollViewer.cs
- MatrixCamera.cs
- Parser.cs
- FeatureSupport.cs
- HttpProcessUtility.cs
- ComponentCollection.cs
- Adorner.cs
- _SslState.cs
- EntryWrittenEventArgs.cs
- WmlCommandAdapter.cs