Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- StopStoryboard.cs
- PageCache.cs
- TextOutput.cs
- WebScriptEndpoint.cs
- SqlTypeConverter.cs
- SqlDataReaderSmi.cs
- CngUIPolicy.cs
- DataRecord.cs
- ResourceSet.cs
- OperationInvokerBehavior.cs
- NotificationContext.cs
- GridViewColumnHeaderAutomationPeer.cs
- DBSqlParserColumn.cs
- StylusPointPropertyUnit.cs
- DSASignatureFormatter.cs
- Transform.cs
- X509PeerCertificateAuthentication.cs
- OperatorExpressions.cs
- InkPresenterAutomationPeer.cs
- AssemblyName.cs
- SortFieldComparer.cs
- CompiledELinqQueryState.cs
- HttpConfigurationSystem.cs
- EditorZone.cs
- ChangeInterceptorAttribute.cs
- RowSpanVector.cs
- ApplicationSecurityManager.cs
- SpeechSeg.cs
- uribuilder.cs
- ReachVisualSerializer.cs
- _OverlappedAsyncResult.cs
- _NTAuthentication.cs
- UnsafeNativeMethodsMilCoreApi.cs
- WebControlAdapter.cs
- InkCanvasSelection.cs
- ChannelManagerService.cs
- DbMetaDataFactory.cs
- NativeCppClassAttribute.cs
- TextBox.cs
- SystemWebSectionGroup.cs
- CodeCommentStatementCollection.cs
- SByteConverter.cs
- BitmapSource.cs
- CodeComment.cs
- StreamProxy.cs
- StorageEntitySetMapping.cs
- XsdBuildProvider.cs
- MessageBuffer.cs
- RoleService.cs
- FunctionDescription.cs
- HttpRuntime.cs
- MethodBuilderInstantiation.cs
- UnaryExpression.cs
- TextTreeFixupNode.cs
- SqlDataReader.cs
- ComplexPropertyEntry.cs
- InputScope.cs
- InputProcessorProfiles.cs
- MetadataCache.cs
- SiteMapDataSourceView.cs
- ListDictionary.cs
- SignatureDescription.cs
- ToolStripSplitButton.cs
- SoapFormatterSinks.cs
- RTTypeWrapper.cs
- OperationCanceledException.cs
- BitStream.cs
- DoubleLink.cs
- MatrixKeyFrameCollection.cs
- TranslateTransform3D.cs
- DataStreams.cs
- DateTimePicker.cs
- FontDialog.cs
- CellCreator.cs
- SecurityPolicySection.cs
- _AcceptOverlappedAsyncResult.cs
- TargetPerspective.cs
- FastEncoderWindow.cs
- ProviderCollection.cs
- HuffmanTree.cs
- IdentifierCollection.cs
- StretchValidation.cs
- OutKeywords.cs
- DirectoryRedirect.cs
- PaginationProgressEventArgs.cs
- StateMachineWorkflow.cs
- Codec.cs
- ConfigsHelper.cs
- ClickablePoint.cs
- CrossSiteScriptingValidation.cs
- TextContainerChangedEventArgs.cs
- StringInfo.cs
- OperationAbortedException.cs
- Maps.cs
- AssociationSetMetadata.cs
- Emitter.cs
- BitStack.cs
- PerformanceCountersElement.cs
- RawStylusSystemGestureInputReport.cs
- NetworkInformationPermission.cs