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
- DataSourceHelper.cs
- NodeInfo.cs
- ServicePoint.cs
- OuterGlowBitmapEffect.cs
- CodeDomConfigurationHandler.cs
- X509Extension.cs
- PathFigureCollectionConverter.cs
- ObjectListCommand.cs
- DataGridViewCellStyleEditor.cs
- HttpServerVarsCollection.cs
- DataGridViewCellParsingEventArgs.cs
- StyleReferenceConverter.cs
- AsyncOperationContext.cs
- WaitHandleCannotBeOpenedException.cs
- WmlImageAdapter.cs
- PackageRelationshipCollection.cs
- CatalogZone.cs
- SettingsSection.cs
- FixedSOMFixedBlock.cs
- AccessKeyManager.cs
- ArgumentNullException.cs
- CapabilitiesSection.cs
- PngBitmapEncoder.cs
- RawStylusSystemGestureInputReport.cs
- TemplateComponentConnector.cs
- CommandPlan.cs
- ReadOnlyDataSource.cs
- CacheRequest.cs
- HttpWebRequest.cs
- BaseProcessProtocolHandler.cs
- PersonalizationDictionary.cs
- PreloadHost.cs
- DriveInfo.cs
- XPathScanner.cs
- ListViewDataItem.cs
- ToolStripButton.cs
- SqlTopReducer.cs
- TableCell.cs
- DispatcherObject.cs
- DrawItemEvent.cs
- FreeFormDragDropManager.cs
- WindowsFormsLinkLabel.cs
- XamlParser.cs
- ConfigurationStrings.cs
- WebBrowserBase.cs
- SqlDataReader.cs
- TextEditorSelection.cs
- IdentityModelDictionary.cs
- CodeCatchClause.cs
- MethodExpr.cs
- SymbolUsageManager.cs
- EpmAttributeNameBuilder.cs
- CollectionView.cs
- CookieParameter.cs
- ComboBox.cs
- MetadataUtil.cs
- HtmlTableRow.cs
- KeyValueSerializer.cs
- ObjectDataSourceEventArgs.cs
- FixedSOMLineRanges.cs
- BitmapCodecInfoInternal.cs
- _HTTPDateParse.cs
- PasswordDeriveBytes.cs
- FixedLineResult.cs
- FileLevelControlBuilderAttribute.cs
- ReferenceEqualityComparer.cs
- SelectorAutomationPeer.cs
- DescriptionAttribute.cs
- FlowDocument.cs
- WebPartZone.cs
- XmlNodeChangedEventArgs.cs
- EntityCommandDefinition.cs
- DependencyObjectType.cs
- TextContainerChangeEventArgs.cs
- PatternMatcher.cs
- PngBitmapEncoder.cs
- TextDecorationCollectionConverter.cs
- QueryStringHandler.cs
- AttributeConverter.cs
- TextSelectionHelper.cs
- BitmapEffectState.cs
- TemplateDefinition.cs
- QilFunction.cs
- FactoryGenerator.cs
- AdjustableArrowCap.cs
- ComponentDispatcherThread.cs
- DropShadowEffect.cs
- UIPermission.cs
- LinqDataSource.cs
- XmlUrlResolver.cs
- CounterSampleCalculator.cs
- GridViewSelectEventArgs.cs
- DesignerAttributeInfo.cs
- DBConnectionString.cs
- KeyValueSerializer.cs
- SafeNativeMemoryHandle.cs
- XmlSchemaChoice.cs
- EventsTab.cs
- BindableTemplateBuilder.cs
- ServiceX509SecurityTokenProvider.cs