Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / wpf / src / Framework / System / Windows / Markup / TemplateKeyConverter.cs / 1 / 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. /****************************************************************************\ * * 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
- MetafileHeaderWmf.cs
- GeneralTransform3D.cs
- InternalSafeNativeMethods.cs
- CodeVariableDeclarationStatement.cs
- FormsAuthenticationUser.cs
- SQLInt16Storage.cs
- WorkflowMarkupSerializationManager.cs
- VisualStateGroup.cs
- RowToParametersTransformer.cs
- Command.cs
- DocumentGridPage.cs
- ServiceManager.cs
- UserControlBuildProvider.cs
- InkCanvasSelectionAdorner.cs
- NoClickablePointException.cs
- ComplexObject.cs
- DocumentsTrace.cs
- BitmapEffectDrawing.cs
- Avt.cs
- ChannelBuilder.cs
- BooleanConverter.cs
- JavaScriptObjectDeserializer.cs
- TextTreeText.cs
- ProviderBase.cs
- SendMailErrorEventArgs.cs
- LogExtent.cs
- ImageBrush.cs
- NativeMethods.cs
- MostlySingletonList.cs
- PartitionResolver.cs
- TextParagraphProperties.cs
- InspectionWorker.cs
- SqlUtils.cs
- HasRunnableWorkflowEvent.cs
- CompilerGeneratedAttribute.cs
- KerberosRequestorSecurityToken.cs
- Cursors.cs
- MessageHeaderAttribute.cs
- InstanceKeyCompleteException.cs
- CompModSwitches.cs
- LazyTextWriterCreator.cs
- DockAndAnchorLayout.cs
- SineEase.cs
- ProbeMatchesMessage11.cs
- DetailsViewRowCollection.cs
- ListMarkerSourceInfo.cs
- ListViewItem.cs
- PrintDialog.cs
- HttpRequestCacheValidator.cs
- LinkUtilities.cs
- ImageButton.cs
- BitmapEffectGeneralTransform.cs
- FakeModelItemImpl.cs
- _SslSessionsCache.cs
- FixedSOMPageConstructor.cs
- ToolStripRenderEventArgs.cs
- XhtmlStyleClass.cs
- EventlogProvider.cs
- AuthenticationServiceManager.cs
- Mappings.cs
- XmlAggregates.cs
- ParagraphVisual.cs
- WebPartConnectionsCancelVerb.cs
- SequenceFullException.cs
- Common.cs
- ScopelessEnumAttribute.cs
- AnnotationResourceCollection.cs
- DesignerDataConnection.cs
- ResourceAssociationTypeEnd.cs
- DataGridColumnStyleMappingNameEditor.cs
- Int32AnimationBase.cs
- PersonalizationProviderCollection.cs
- UserControl.cs
- LogEntryHeaderv1Deserializer.cs
- ChangeBlockUndoRecord.cs
- PrimitiveType.cs
- ContainerSelectorGlyph.cs
- ZipFileInfoCollection.cs
- Literal.cs
- EventDescriptor.cs
- Stylesheet.cs
- FontStretches.cs
- AdapterUtil.cs
- ResourcePart.cs
- WindowsListBox.cs
- ConfigurationConverterBase.cs
- RemoteHelper.cs
- ConfigurationSettings.cs
- Int32AnimationUsingKeyFrames.cs
- InvalidComObjectException.cs
- ReadWriteObjectLock.cs
- VectorCollection.cs
- DesignerVerbCollection.cs
- MdiWindowListItemConverter.cs
- WithStatement.cs
- DataGridViewCellCollection.cs
- SettingsPropertyWrongTypeException.cs
- SourceFileInfo.cs
- _NestedMultipleAsyncResult.cs
- MailWebEventProvider.cs