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
- RuntimeHandles.cs
- SerializationFieldInfo.cs
- IntegerCollectionEditor.cs
- PnrpPermission.cs
- RSACryptoServiceProvider.cs
- DbConvert.cs
- BindingSourceDesigner.cs
- XamlInterfaces.cs
- TemplatedMailWebEventProvider.cs
- StrokeNodeData.cs
- BinaryMessageEncodingElement.cs
- Block.cs
- WebBrowserEvent.cs
- DomainUpDown.cs
- ResetableIterator.cs
- odbcmetadatafactory.cs
- PageVisual.cs
- Win32KeyboardDevice.cs
- ContextProperty.cs
- ListViewTableCell.cs
- mansign.cs
- ZipIOLocalFileBlock.cs
- MdiWindowListItemConverter.cs
- WebPartAuthorizationEventArgs.cs
- DataControlButton.cs
- FtpWebResponse.cs
- MailSettingsSection.cs
- HotSpot.cs
- CatalogZoneAutoFormat.cs
- userdatakeys.cs
- ChildrenQuery.cs
- BamlLocalizableResourceKey.cs
- CompilerInfo.cs
- ParserOptions.cs
- XmlWhitespace.cs
- Types.cs
- ApplicationInterop.cs
- GraphicsPath.cs
- MetadataItemCollectionFactory.cs
- TextEditorCharacters.cs
- IsolatedStorageFileStream.cs
- HMACRIPEMD160.cs
- TabPage.cs
- DocumentViewerConstants.cs
- EDesignUtil.cs
- ToolStripItem.cs
- TCPListener.cs
- LongValidatorAttribute.cs
- TrustSection.cs
- InfiniteTimeSpanConverter.cs
- OneOfConst.cs
- LinqDataSourceHelper.cs
- AdornerDecorator.cs
- GcSettings.cs
- FixedSOMTable.cs
- DependencyProperty.cs
- ObjectSpanRewriter.cs
- ConfigurationException.cs
- SHA384.cs
- ThreadStaticAttribute.cs
- X509Utils.cs
- Int16Storage.cs
- HttpServerVarsCollection.cs
- DesignerCommandSet.cs
- XmlQualifiedNameTest.cs
- UidManager.cs
- SqlXml.cs
- QilXmlReader.cs
- ConsoleKeyInfo.cs
- SyndicationItemFormatter.cs
- XPathMessageContext.cs
- NodeLabelEditEvent.cs
- TypeBuilderInstantiation.cs
- DrawingCollection.cs
- GenericWebPart.cs
- XmlAttributeCache.cs
- GroupBox.cs
- SynchronizationContext.cs
- StrokeIntersection.cs
- GACMembershipCondition.cs
- SelectionUIService.cs
- CTreeGenerator.cs
- EnumType.cs
- OdbcParameter.cs
- CheckBoxAutomationPeer.cs
- FormattedText.cs
- DependentTransaction.cs
- FormViewInsertEventArgs.cs
- SettingsBindableAttribute.cs
- InArgument.cs
- PenLineCapValidation.cs
- PrincipalPermission.cs
- FunctionParameter.cs
- BitmapEffectGeneralTransform.cs
- Oid.cs
- NumericExpr.cs
- NotifyParentPropertyAttribute.cs
- FrameworkTemplate.cs
- CodeNamespaceCollection.cs
- CodeTypeConstructor.cs