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
- FrameworkElementFactory.cs
- SignedInfo.cs
- TemplateKeyConverter.cs
- ListViewUpdatedEventArgs.cs
- RepeaterItemEventArgs.cs
- DetailsViewPagerRow.cs
- TreeNode.cs
- AppManager.cs
- SubpageParaClient.cs
- XmlDocumentType.cs
- ConnectionProviderAttribute.cs
- ChooseAction.cs
- SafeEventLogWriteHandle.cs
- UInt16Converter.cs
- webproxy.cs
- Binding.cs
- ProxySimple.cs
- TextReader.cs
- OrthographicCamera.cs
- TreeNodeStyleCollection.cs
- EntityDataSourceSelectedEventArgs.cs
- Configuration.cs
- BooleanFunctions.cs
- ServiceDefaults.cs
- RelationshipNavigation.cs
- FigureParagraph.cs
- EnumBuilder.cs
- sqlser.cs
- WindowsButton.cs
- DataGridViewMethods.cs
- EditingCoordinator.cs
- SamlSubjectStatement.cs
- TableLayoutPanel.cs
- XmlTypeAttribute.cs
- NativeMethodsOther.cs
- TextViewElement.cs
- Method.cs
- LockedHandleGlyph.cs
- HorizontalAlignConverter.cs
- OdbcRowUpdatingEvent.cs
- BaseServiceProvider.cs
- MULTI_QI.cs
- SoapSchemaMember.cs
- GraphicsState.cs
- DataBoundControlAdapter.cs
- TransactionException.cs
- SymbolUsageManager.cs
- MonthChangedEventArgs.cs
- DeploymentSectionCache.cs
- LayeredChannelListener.cs
- SamlAction.cs
- DataControlField.cs
- SqlProviderManifest.cs
- IdnMapping.cs
- InputScope.cs
- ProcessHostConfigUtils.cs
- SwitchElementsCollection.cs
- GetWinFXPath.cs
- LinkedResourceCollection.cs
- CallTemplateAction.cs
- ProfileSettings.cs
- ListBoxChrome.cs
- FamilyCollection.cs
- AmbientValueAttribute.cs
- UInt16.cs
- CustomValidator.cs
- XPathMultyIterator.cs
- SettingsAttributes.cs
- DataControlButton.cs
- SoapHeaderException.cs
- sqlnorm.cs
- _CommandStream.cs
- UserControlParser.cs
- Select.cs
- EdgeProfileValidation.cs
- WindowsGrip.cs
- SqlCharStream.cs
- CssClassPropertyAttribute.cs
- SplashScreenNativeMethods.cs
- ToolStripSettings.cs
- RichListBox.cs
- DataGridViewIntLinkedList.cs
- ScriptBehaviorDescriptor.cs
- SliderAutomationPeer.cs
- ProcessModuleCollection.cs
- CorrelationTokenInvalidatedHandler.cs
- DependentTransaction.cs
- AssemblyAssociatedContentFileAttribute.cs
- TextEffect.cs
- RuntimeWrappedException.cs
- EnumValidator.cs
- BaseDataListActionList.cs
- HotSpotCollection.cs
- TableItemPattern.cs
- DocumentViewerConstants.cs
- KeySplineConverter.cs
- XPathExpr.cs
- CustomTrackingQuery.cs
- BlockingCollection.cs
- QfeChecker.cs