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
- QilCloneVisitor.cs
- MessageProperties.cs
- VisualStyleTypesAndProperties.cs
- Literal.cs
- DebugHandleTracker.cs
- DomainUpDown.cs
- codemethodreferenceexpression.cs
- ModuleConfigurationInfo.cs
- SrgsToken.cs
- ActivityDesignerHighlighter.cs
- GridErrorDlg.cs
- TraceXPathNavigator.cs
- Int16Converter.cs
- DataGridViewCellStyle.cs
- BaseResourcesBuildProvider.cs
- DetailsViewDeletedEventArgs.cs
- EntityParameterCollection.cs
- MarshalByValueComponent.cs
- Metafile.cs
- ManipulationStartedEventArgs.cs
- ObjectSecurityT.cs
- DataGridViewComboBoxCell.cs
- DataGridColumnCollection.cs
- CommonProperties.cs
- ByteStack.cs
- ValidationErrorCollection.cs
- NumberFormatInfo.cs
- OpenCollectionAsyncResult.cs
- __Error.cs
- DefaultBindingPropertyAttribute.cs
- BrowserDefinition.cs
- TempFiles.cs
- ComponentChangedEvent.cs
- DeviceContext2.cs
- RegionIterator.cs
- SimpleType.cs
- DiscreteKeyFrames.cs
- SoapTypeAttribute.cs
- _NestedMultipleAsyncResult.cs
- DataControlImageButton.cs
- BaseParaClient.cs
- UnmanagedMarshal.cs
- ColorInterpolationModeValidation.cs
- COM2IDispatchConverter.cs
- HttpApplication.cs
- VirtualStackFrame.cs
- WithStatement.cs
- ReflectionServiceProvider.cs
- XPathNodeHelper.cs
- InkSerializer.cs
- PageCodeDomTreeGenerator.cs
- System.Data.OracleClient_BID.cs
- Attributes.cs
- ConfigurationManagerInternalFactory.cs
- FramingDecoders.cs
- ProfileServiceManager.cs
- Ipv6Element.cs
- XmlAutoDetectWriter.cs
- TempFiles.cs
- MappingException.cs
- XmlDataProvider.cs
- EqualityComparer.cs
- WindowsButton.cs
- DataGridViewRowsAddedEventArgs.cs
- InstanceKey.cs
- MsmqIntegrationProcessProtocolHandler.cs
- XmlDataSourceView.cs
- RootProjectionNode.cs
- DropDownList.cs
- RegistrationProxy.cs
- SharedPerformanceCounter.cs
- ValueSerializer.cs
- XmlSchemaFacet.cs
- TypefaceMap.cs
- CategoryAttribute.cs
- ElementMarkupObject.cs
- ExcludePathInfo.cs
- Behavior.cs
- AsyncPostBackTrigger.cs
- ArrayConverter.cs
- DataTable.cs
- PreProcessInputEventArgs.cs
- ObjectCacheSettings.cs
- Rotation3DKeyFrameCollection.cs
- PostBackTrigger.cs
- Image.cs
- UpDownBase.cs
- AbsoluteQuery.cs
- invalidudtexception.cs
- AspCompat.cs
- WebServicesInteroperability.cs
- IDictionary.cs
- CacheEntry.cs
- WebPartUtil.cs
- sortedlist.cs
- WebServiceResponse.cs
- DomNameTable.cs
- ObjectQuery_EntitySqlExtensions.cs
- SByteStorage.cs
- Token.cs