Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / Markup / TemplateKeyConverter.cs / 1305600 / 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
- RepeaterCommandEventArgs.cs
- WebExceptionStatus.cs
- RsaKeyGen.cs
- PropertyEntry.cs
- ViewCellSlot.cs
- MembershipValidatePasswordEventArgs.cs
- TransformValueSerializer.cs
- MultiTouchSystemGestureLogic.cs
- SettingsSection.cs
- TraceHelpers.cs
- MobileControlPersister.cs
- LinearGradientBrush.cs
- BitmapVisualManager.cs
- ControlDesigner.cs
- XmlArrayItemAttribute.cs
- DataGridSortCommandEventArgs.cs
- AuthenticationConfig.cs
- ObjectDataProvider.cs
- QilName.cs
- PopupRootAutomationPeer.cs
- relpropertyhelper.cs
- ListenerUnsafeNativeMethods.cs
- SQLString.cs
- PageFunction.cs
- XXXOnTypeBuilderInstantiation.cs
- WebProxyScriptElement.cs
- ParserExtension.cs
- SmiEventSink_Default.cs
- ManagementObjectCollection.cs
- WindowsProgressbar.cs
- NonDualMessageSecurityOverHttp.cs
- CheckBoxAutomationPeer.cs
- ListViewTableRow.cs
- ExtendedPropertyDescriptor.cs
- DataAdapter.cs
- SequentialWorkflowHeaderFooter.cs
- ManagedFilter.cs
- DataGridViewSelectedColumnCollection.cs
- UnsafeNativeMethods.cs
- ListView.cs
- ContextDataSource.cs
- Logging.cs
- EmulateRecognizeCompletedEventArgs.cs
- MasterPage.cs
- ProfilePropertySettings.cs
- EndpointDispatcherTable.cs
- HttpProfileGroupBase.cs
- Event.cs
- DetailsViewInsertedEventArgs.cs
- HtmlTitle.cs
- XamlBrushSerializer.cs
- TextDecorationLocationValidation.cs
- Latin1Encoding.cs
- HttpHandlerAction.cs
- Roles.cs
- AuthenticationConfig.cs
- SymmetricCryptoHandle.cs
- ValueQuery.cs
- EndpointDesigner.cs
- BaseProcessor.cs
- EnumUnknown.cs
- MethodRental.cs
- SecurityTokenAuthenticator.cs
- HtmlListAdapter.cs
- IsolatedStorage.cs
- ToolStripDropDownItem.cs
- DataSourceHelper.cs
- FontWeights.cs
- EntityDataSourceSelectingEventArgs.cs
- NotSupportedException.cs
- QilInvoke.cs
- SecurityDocument.cs
- JsonDeserializer.cs
- ProcessHostFactoryHelper.cs
- ParserStreamGeometryContext.cs
- ContractTypeNameCollection.cs
- ObjectParameter.cs
- COM2AboutBoxPropertyDescriptor.cs
- WorkflowInspectionServices.cs
- CollectionViewProxy.cs
- ColumnMapTranslator.cs
- TreeNodeSelectionProcessor.cs
- PackageRelationshipSelector.cs
- ArraySet.cs
- GetLedgerRequest.cs
- UIElementAutomationPeer.cs
- AutoCompleteStringCollection.cs
- StandardOleMarshalObject.cs
- SchemaInfo.cs
- IntSecurity.cs
- WsatConfiguration.cs
- TextChange.cs
- NotConverter.cs
- AvtEvent.cs
- ObjectFactoryCodeDomTreeGenerator.cs
- ArrayTypeMismatchException.cs
- WinEventTracker.cs
- SHA512Managed.cs
- ChineseLunisolarCalendar.cs
- TextContainerHelper.cs