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
- FileAuthorizationModule.cs
- XPathAncestorQuery.cs
- ComplexBindingPropertiesAttribute.cs
- DataGridViewLayoutData.cs
- Substitution.cs
- ActivityExecutionContextCollection.cs
- GridViewPageEventArgs.cs
- safex509handles.cs
- LocationUpdates.cs
- TriggerCollection.cs
- EnvironmentPermission.cs
- ToolStripLabel.cs
- DataProviderNameConverter.cs
- ListItemCollection.cs
- ResourceReferenceExpression.cs
- TrackingRecord.cs
- _ConnectOverlappedAsyncResult.cs
- EntityDataSourceSelectingEventArgs.cs
- DispatcherExceptionEventArgs.cs
- HeaderUtility.cs
- OLEDB_Util.cs
- WebSysDescriptionAttribute.cs
- TextTreeNode.cs
- ContourSegment.cs
- OperationContextScope.cs
- EngineSite.cs
- PopupRootAutomationPeer.cs
- InvalidateEvent.cs
- QueryParameter.cs
- WebRequestModuleElement.cs
- ReadContentAsBinaryHelper.cs
- HierarchicalDataSourceIDConverter.cs
- Encoder.cs
- ServiceOperationParameter.cs
- BackgroundWorker.cs
- XmlNotation.cs
- SqlMultiplexer.cs
- HttpContext.cs
- CryptoHandle.cs
- cache.cs
- SchemaEntity.cs
- XmlHelper.cs
- Latin1Encoding.cs
- VolatileResourceManager.cs
- BaseParser.cs
- IxmlLineInfo.cs
- GroupBox.cs
- RuleProcessor.cs
- GB18030Encoding.cs
- ClientCultureInfo.cs
- NameValueCollection.cs
- RequestUriProcessor.cs
- Attribute.cs
- ColorKeyFrameCollection.cs
- BlobPersonalizationState.cs
- DependentList.cs
- CrossContextChannel.cs
- GradientStop.cs
- ColumnTypeConverter.cs
- CheckBoxRenderer.cs
- WindowsEditBox.cs
- CompressedStack.cs
- Environment.cs
- ServiceNameCollection.cs
- DelegatingConfigHost.cs
- ContentPlaceHolderDesigner.cs
- CalendarButtonAutomationPeer.cs
- Win32KeyboardDevice.cs
- GB18030Encoding.cs
- DefaultParameterValueAttribute.cs
- SHA1CryptoServiceProvider.cs
- OdbcConnectionFactory.cs
- ToolZoneDesigner.cs
- XmlQueryTypeFactory.cs
- CodeTypeOfExpression.cs
- BulletDecorator.cs
- LicFileLicenseProvider.cs
- VerticalAlignConverter.cs
- XmlSchemaChoice.cs
- MeasurementDCInfo.cs
- MessageBuffer.cs
- FileAuthorizationModule.cs
- Tablet.cs
- WsiProfilesElement.cs
- CapiSafeHandles.cs
- _HelperAsyncResults.cs
- IRCollection.cs
- ColorAnimationBase.cs
- PeerFlooder.cs
- pingexception.cs
- UnlockInstanceAsyncResult.cs
- XslAstAnalyzer.cs
- NativeMethods.cs
- DataServiceStreamResponse.cs
- TypeContext.cs
- UnsupportedPolicyOptionsException.cs
- Span.cs
- XmlHierarchicalDataSourceView.cs
- BaseAsyncResult.cs
- ControlPropertyNameConverter.cs