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
- IDQuery.cs
- SQLInt16Storage.cs
- FileSystemEnumerable.cs
- HandleCollector.cs
- SelectorItemAutomationPeer.cs
- StateItem.cs
- NativeMethodsCLR.cs
- ColumnTypeConverter.cs
- Table.cs
- DataTrigger.cs
- LogExtentCollection.cs
- Matrix3D.cs
- TriggerBase.cs
- EncoderFallback.cs
- BezierSegment.cs
- SmtpNegotiateAuthenticationModule.cs
- SymbolDocumentGenerator.cs
- DataGridViewMethods.cs
- TypeUtils.cs
- ToolBarButtonClickEvent.cs
- XmlNamedNodeMap.cs
- ServiceModelActivity.cs
- TypeElement.cs
- ManagedIStream.cs
- EntitySqlQueryBuilder.cs
- LogReservationCollection.cs
- VSWCFServiceContractGenerator.cs
- KoreanLunisolarCalendar.cs
- EmbeddedMailObject.cs
- Rotation3DKeyFrameCollection.cs
- NoResizeSelectionBorderGlyph.cs
- CodeTypeMemberCollection.cs
- UiaCoreTypesApi.cs
- SqlBuffer.cs
- ToolStripItemClickedEventArgs.cs
- EncodingDataItem.cs
- JournalNavigationScope.cs
- DynamicArgumentDesigner.xaml.cs
- DBConnection.cs
- Form.cs
- HttpBufferlessInputStream.cs
- Base64Decoder.cs
- Tablet.cs
- Semaphore.cs
- entityreference_tresulttype.cs
- StateMachine.cs
- ControlPropertyNameConverter.cs
- ContextQuery.cs
- ItemList.cs
- xmlsaver.cs
- FilterElement.cs
- ColorConverter.cs
- ManagementNamedValueCollection.cs
- QuaternionAnimation.cs
- PictureBoxDesigner.cs
- _SslState.cs
- MetadataSerializer.cs
- DynamicValidatorEventArgs.cs
- ClientBuildManagerTypeDescriptionProviderBridge.cs
- SocketPermission.cs
- MessageQueueConverter.cs
- ObjectStateFormatter.cs
- SecurityManager.cs
- UnsafeNativeMethods.cs
- SQLByte.cs
- EntityContainer.cs
- PriorityBinding.cs
- PackWebRequestFactory.cs
- COM2IPerPropertyBrowsingHandler.cs
- AppDomainProtocolHandler.cs
- sitestring.cs
- HttpInputStream.cs
- IDispatchConstantAttribute.cs
- Visual3D.cs
- TraceListener.cs
- IndependentAnimationStorage.cs
- ZoomPercentageConverter.cs
- RenderOptions.cs
- SQLDateTimeStorage.cs
- MsmqMessage.cs
- SQLInt32Storage.cs
- SmtpFailedRecipientException.cs
- ScriptingProfileServiceSection.cs
- PersonalizationEntry.cs
- RuntimeConfig.cs
- ProbeMatchesMessageCD1.cs
- Token.cs
- Propagator.JoinPropagator.cs
- Soap12ProtocolImporter.cs
- ProcessProtocolHandler.cs
- ArgumentNullException.cs
- ZoneButton.cs
- PageClientProxyGenerator.cs
- XPathParser.cs
- ValueUnavailableException.cs
- RepeaterItemEventArgs.cs
- DataServiceConfiguration.cs
- Config.cs
- GuidelineSet.cs
- DateTimeParse.cs