Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- UntrustedRecipientException.cs
- EndpointConfigContainer.cs
- CommonRemoteMemoryBlock.cs
- WindowsScrollBarBits.cs
- Visual3D.cs
- WebPartTransformerAttribute.cs
- CreateUserWizard.cs
- DefinitionBase.cs
- PlanCompiler.cs
- FormViewCommandEventArgs.cs
- KnowledgeBase.cs
- BinHexEncoder.cs
- AutomationPropertyInfo.cs
- MeshGeometry3D.cs
- XmlCharacterData.cs
- EntityModelBuildProvider.cs
- TimersDescriptionAttribute.cs
- SqlExpander.cs
- UInt32.cs
- CornerRadiusConverter.cs
- ComboBox.cs
- HostedHttpTransportManager.cs
- Rotation3DAnimationUsingKeyFrames.cs
- ManagementEventArgs.cs
- CRYPTPROTECT_PROMPTSTRUCT.cs
- UpdateRecord.cs
- NotCondition.cs
- TypeBuilderInstantiation.cs
- SchemaUtility.cs
- _LocalDataStoreMgr.cs
- DbgUtil.cs
- IIS7WorkerRequest.cs
- HttpCacheVary.cs
- UniqueID.cs
- ConnectionStringsExpressionEditor.cs
- CatalogPartCollection.cs
- BitmapEffectDrawingContent.cs
- VectorCollectionValueSerializer.cs
- HideDisabledControlAdapter.cs
- TrustLevel.cs
- XmlRootAttribute.cs
- Privilege.cs
- AsmxEndpointPickerExtension.cs
- VoiceChangeEventArgs.cs
- GridViewItemAutomationPeer.cs
- HttpWriter.cs
- TableRowCollection.cs
- XPathCompileException.cs
- ControlAdapter.cs
- ExpressionLexer.cs
- InheritanceUI.cs
- FormsAuthenticationEventArgs.cs
- WorkflowServiceHostFactory.cs
- XmlCharacterData.cs
- CreateUserWizard.cs
- UnsafeNativeMethods.cs
- Convert.cs
- TypeNameParser.cs
- XmlCustomFormatter.cs
- SerTrace.cs
- OpenTypeMethods.cs
- DependencyObjectPropertyDescriptor.cs
- RecordConverter.cs
- DataRelation.cs
- DataRelationCollection.cs
- ScriptControlManager.cs
- LineGeometry.cs
- ToolStripContentPanelDesigner.cs
- TrackBar.cs
- XmlNavigatorFilter.cs
- WebPartMovingEventArgs.cs
- ADConnectionHelper.cs
- SqlException.cs
- Debugger.cs
- DesignerAutoFormatCollection.cs
- Message.cs
- KeyTime.cs
- DataGridViewTopRowAccessibleObject.cs
- WizardForm.cs
- Utils.cs
- ForEachDesigner.xaml.cs
- ReadOnlyDataSource.cs
- WebPartConnectionsConnectVerb.cs
- CodeCompileUnit.cs
- MetadataWorkspace.cs
- Unit.cs
- CodeTypeOfExpression.cs
- _LoggingObject.cs
- DataTableClearEvent.cs
- JsonCollectionDataContract.cs
- SmiEventSink_DeferedProcessing.cs
- RemoteHelper.cs
- RoutedEventValueSerializer.cs
- NavigationEventArgs.cs
- DataErrorValidationRule.cs
- SpellCheck.cs
- TickBar.cs
- IdentitySection.cs
- Grid.cs
- DelegatingHeader.cs