Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- RoleGroupCollection.cs
- SchemaImporter.cs
- WebServiceClientProxyGenerator.cs
- XmlElementCollection.cs
- RemoteWebConfigurationHostStream.cs
- InlineObject.cs
- TickBar.cs
- FileClassifier.cs
- TempFiles.cs
- WebPartEventArgs.cs
- DbXmlEnabledProviderManifest.cs
- DbgCompiler.cs
- ColorInterpolationModeValidation.cs
- DataGridCommandEventArgs.cs
- WebBrowserDocumentCompletedEventHandler.cs
- DictionaryBase.cs
- SqlUnionizer.cs
- XmlSerializerNamespaces.cs
- NativeActivityTransactionContext.cs
- PlatformCulture.cs
- NativeCompoundFileAPIs.cs
- DrawingVisual.cs
- VScrollBar.cs
- BigInt.cs
- FigureParaClient.cs
- ETagAttribute.cs
- MenuCommands.cs
- EntityClientCacheEntry.cs
- _NestedSingleAsyncResult.cs
- NewExpression.cs
- XpsS0ValidatingLoader.cs
- ToolStripTextBox.cs
- Attributes.cs
- XmlSchemaException.cs
- SQLChars.cs
- HttpConfigurationSystem.cs
- TextRangeAdaptor.cs
- CodeCatchClauseCollection.cs
- SoapAttributeAttribute.cs
- SettingsContext.cs
- GenericIdentity.cs
- UniqueSet.cs
- RowsCopiedEventArgs.cs
- MultilineStringConverter.cs
- CommentEmitter.cs
- AbstractSvcMapFileLoader.cs
- LinkConverter.cs
- StringSource.cs
- Decimal.cs
- IPPacketInformation.cs
- WsatTransactionInfo.cs
- DataGridViewComboBoxColumn.cs
- Event.cs
- RadioButton.cs
- panel.cs
- Schema.cs
- OracleRowUpdatedEventArgs.cs
- QilParameter.cs
- UnknownWrapper.cs
- EntitySet.cs
- GraphicsPathIterator.cs
- DateTimeConverter2.cs
- SpAudioStreamWrapper.cs
- XmlSerializationWriter.cs
- ClientData.cs
- QueryPageSettingsEventArgs.cs
- ZipFileInfoCollection.cs
- ValueType.cs
- NotifyIcon.cs
- UnsignedPublishLicense.cs
- IisTraceListener.cs
- DataGridSortingEventArgs.cs
- DurableRuntimeValidator.cs
- SqlCharStream.cs
- SystemIPInterfaceStatistics.cs
- mediaeventargs.cs
- RIPEMD160Managed.cs
- DigitShape.cs
- PtsPage.cs
- OdbcConnectionPoolProviderInfo.cs
- StyleCollectionEditor.cs
- AlternateView.cs
- SqlProcedureAttribute.cs
- StoreContentChangedEventArgs.cs
- StateInitialization.cs
- ThrowHelper.cs
- GPRECTF.cs
- DataServiceException.cs
- mansign.cs
- System.Data.OracleClient_BID.cs
- DataServiceExpressionVisitor.cs
- List.cs
- XmlNamespaceManager.cs
- HtmlElement.cs
- Listbox.cs
- SafeNativeMethods.cs
- NamespaceDecl.cs
- ApplicationSecurityManager.cs
- BasePattern.cs
- ACL.cs