Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- AdornerHitTestResult.cs
- CAGDesigner.cs
- SQLUtility.cs
- SmtpDigestAuthenticationModule.cs
- Journaling.cs
- XPathChildIterator.cs
- VersionUtil.cs
- GeometryModel3D.cs
- ReadOnlyDataSource.cs
- XsdBuildProvider.cs
- Operator.cs
- CollectionChangedEventManager.cs
- SingleConverter.cs
- ICspAsymmetricAlgorithm.cs
- arabicshape.cs
- ResourceSet.cs
- DefaultValueTypeConverter.cs
- DirectoryNotFoundException.cs
- JsonEncodingStreamWrapper.cs
- WebPartConnectionsCloseVerb.cs
- WindowsRichEdit.cs
- DataGridViewRowHeaderCell.cs
- TextureBrush.cs
- ZipPackage.cs
- DiagnosticTrace.cs
- CombinedGeometry.cs
- RelatedView.cs
- RouteData.cs
- TextEditorMouse.cs
- ExtentCqlBlock.cs
- UnsafeNativeMethods.cs
- MaterialCollection.cs
- DataSetUtil.cs
- KerberosRequestorSecurityToken.cs
- DllNotFoundException.cs
- CodeDefaultValueExpression.cs
- DbConnectionInternal.cs
- DataGridParentRows.cs
- IriParsingElement.cs
- Subtree.cs
- SqlPersonalizationProvider.cs
- MetadataUtilsSmi.cs
- ConfigurationLockCollection.cs
- RestHandler.cs
- StreamAsIStream.cs
- HandlerMappingMemo.cs
- HttpApplicationFactory.cs
- ISessionStateStore.cs
- ToolStripItemEventArgs.cs
- IdentityNotMappedException.cs
- TypeBinaryExpression.cs
- GeometryDrawing.cs
- TdsRecordBufferSetter.cs
- _AutoWebProxyScriptWrapper.cs
- SiteMapDataSource.cs
- DataGridCheckBoxColumn.cs
- ProfileSection.cs
- MultipartContentParser.cs
- InvalidPipelineStoreException.cs
- NumericUpDownAcceleration.cs
- OrderingQueryOperator.cs
- RootProfilePropertySettingsCollection.cs
- Rect.cs
- TranslateTransform3D.cs
- Activator.cs
- SystemFonts.cs
- WindowsGrip.cs
- CodeNamespaceCollection.cs
- ObjectQueryExecutionPlan.cs
- SafeFileMapViewHandle.cs
- XsltConvert.cs
- LocatorPartList.cs
- WebUtil.cs
- ZoneLinkButton.cs
- ThousandthOfEmRealPoints.cs
- Setter.cs
- TableLayoutPanel.cs
- MetadataArtifactLoaderXmlReaderWrapper.cs
- Lasso.cs
- _BasicClient.cs
- ToolStripItemImageRenderEventArgs.cs
- EditorReuseAttribute.cs
- ServiceProviders.cs
- WebPartMenuStyle.cs
- PeerOutputChannel.cs
- shaper.cs
- CodeTypeParameterCollection.cs
- Literal.cs
- DataGridHeaderBorder.cs
- BitmapEffectDrawing.cs
- SoapCommonClasses.cs
- _CommandStream.cs
- InputLanguageProfileNotifySink.cs
- RegexCompiler.cs
- TypeForwardedToAttribute.cs
- XmlJsonReader.cs
- Vector3DCollection.cs
- TreeViewTemplateSelector.cs
- LocalizationParserHooks.cs
- DataGridViewHeaderCell.cs