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
- RtfToXamlReader.cs
- QuaternionAnimationBase.cs
- XPathParser.cs
- TimeSpanValidator.cs
- DateTimeSerializationSection.cs
- HtmlInputControl.cs
- SkipStoryboardToFill.cs
- EnumUnknown.cs
- XmlILModule.cs
- DispatcherFrame.cs
- WeakHashtable.cs
- StringExpressionSet.cs
- RepeaterItemEventArgs.cs
- FontResourceCache.cs
- Timeline.cs
- FontWeightConverter.cs
- ListControl.cs
- Confirm.cs
- ReflectionTypeLoadException.cs
- QilFactory.cs
- FontStyle.cs
- DbParameterCollection.cs
- xdrvalidator.cs
- SchemaTableColumn.cs
- JapaneseCalendar.cs
- AutoSizeToolBoxItem.cs
- PieceDirectory.cs
- Object.cs
- LabelAutomationPeer.cs
- HuffModule.cs
- TabControlEvent.cs
- BoundingRectTracker.cs
- Schema.cs
- URLAttribute.cs
- X509ChainPolicy.cs
- _LazyAsyncResult.cs
- ResourceExpressionEditorSheet.cs
- BaseParser.cs
- SqlInternalConnectionSmi.cs
- DurableInstanceManager.cs
- DataGridView.cs
- ScriptComponentDescriptor.cs
- DataGridViewTextBoxCell.cs
- DataControlFieldCollection.cs
- GregorianCalendarHelper.cs
- BitmapEffectDrawingContextState.cs
- SizeF.cs
- DesigntimeLicenseContextSerializer.cs
- SamlConstants.cs
- SplashScreen.cs
- CodeDOMUtility.cs
- ApplicationContext.cs
- MetadataItem.cs
- WebMessageFormatHelper.cs
- TreeViewEvent.cs
- COM2ExtendedBrowsingHandler.cs
- TextTreeTextNode.cs
- ParsedAttributeCollection.cs
- LicenseManager.cs
- ElementProxy.cs
- errorpatternmatcher.cs
- TableHeaderCell.cs
- XmlDataSourceNodeDescriptor.cs
- DocumentDesigner.cs
- BindingSource.cs
- ManagementInstaller.cs
- ImpersonationContext.cs
- SiteIdentityPermission.cs
- ParameterModifier.cs
- AttributeSetAction.cs
- DictionaryBase.cs
- _SslSessionsCache.cs
- DataGridViewCellLinkedList.cs
- QuestionEventArgs.cs
- XslCompiledTransform.cs
- DispatcherOperation.cs
- httpapplicationstate.cs
- ContextDataSource.cs
- KeyboardInputProviderAcquireFocusEventArgs.cs
- WSSecurityPolicy.cs
- FreezableCollection.cs
- SQLString.cs
- Attribute.cs
- HttpErrorTraceRecord.cs
- SrgsElementFactoryCompiler.cs
- EventListener.cs
- UInt64Converter.cs
- EdgeProfileValidation.cs
- EditorZoneAutoFormat.cs
- RowToParametersTransformer.cs
- GroupStyle.cs
- SettingsPropertyWrongTypeException.cs
- Comparer.cs
- PropertyEmitterBase.cs
- ConstructorBuilder.cs
- AudioBase.cs
- MetadataConversionError.cs
- ConfigurationErrorsException.cs
- HashHelper.cs
- CompareValidator.cs