Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Framework / System / Windows / TemplateBindingExpressionConverter.cs / 1 / TemplateBindingExpressionConverter.cs
/****************************************************************************\ * * File: TemplateBindingExpressionConverter.cs * * Class for serializing a TemplateBindingExpression. * * Copyright (C) 2005 by Microsoft Corporation. All rights reserved. * \***************************************************************************/ using System; using System.ComponentModel; using System.Windows; using System.Windows.Data; using System.Windows.Markup; namespace System.Windows { ////// Converts a template binding expression into a MarkupExtension. This is used /// during serialization (the serializer native knows how to serialize an ME). /// public class TemplateBindingExpressionConverter: TypeConverter { ////// Returns true for MarkupExtension /// public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) { if (destinationType == typeof(MarkupExtension)) { return true; } return base.CanConvertTo(context, destinationType); } ////// Converts to a MarkupExtension /// public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType) { if (destinationType == typeof(MarkupExtension)) { TemplateBindingExpression templateBindingExpression = value as TemplateBindingExpression; if (templateBindingExpression == null) throw new ArgumentException(SR.Get(SRID.MustBeOfType, "value", "TemplateBindingExpression")); return templateBindingExpression.TemplateBindingExtension; } return base.ConvertTo(context, culture, value, destinationType); } } } // 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
- InternalControlCollection.cs
- OdbcConnectionHandle.cs
- ObjectQuery.cs
- HtmlTableRowCollection.cs
- DelegatingStream.cs
- ListBoxChrome.cs
- CompiledAction.cs
- complextypematerializer.cs
- XamlSerializationHelper.cs
- WindowsContainer.cs
- XslUrlEditor.cs
- SHA1Managed.cs
- TextChangedEventArgs.cs
- RepeaterCommandEventArgs.cs
- BufferedReadStream.cs
- StateChangeEvent.cs
- FileResponseElement.cs
- WebBrowserEvent.cs
- XmlTextReader.cs
- TextTreeRootTextBlock.cs
- TemplateBindingExtension.cs
- ExitEventArgs.cs
- ComplexLine.cs
- PreviewPageInfo.cs
- ArraySegment.cs
- TranslateTransform.cs
- IntersectQueryOperator.cs
- ProcessDesigner.cs
- ReferenceEqualityComparer.cs
- XmlChoiceIdentifierAttribute.cs
- DispatcherObject.cs
- AuthenticationSection.cs
- DesignerRegionCollection.cs
- LoginAutoFormat.cs
- HwndSourceParameters.cs
- HtmlElementErrorEventArgs.cs
- XmlHierarchicalEnumerable.cs
- Track.cs
- XslVisitor.cs
- SafeCryptContextHandle.cs
- AssociationTypeEmitter.cs
- LinkArea.cs
- HwndKeyboardInputProvider.cs
- MachineKeyConverter.cs
- TargetConverter.cs
- TextFragmentEngine.cs
- ModuleBuilder.cs
- DeferredRunTextReference.cs
- _BaseOverlappedAsyncResult.cs
- FixedSOMPageElement.cs
- WorkflowInstanceContextProvider.cs
- Regex.cs
- FixedNode.cs
- ImageAutomationPeer.cs
- CalendarDataBindingHandler.cs
- FixedTextContainer.cs
- X509ThumbprintKeyIdentifierClause.cs
- ModuleBuilderData.cs
- SourceFilter.cs
- GeometryCollection.cs
- RTLAwareMessageBox.cs
- GridEntry.cs
- RecordsAffectedEventArgs.cs
- DataErrorValidationRule.cs
- TableCellAutomationPeer.cs
- WindowsIPAddress.cs
- ToolStripScrollButton.cs
- QilFactory.cs
- ArgIterator.cs
- Misc.cs
- DbProviderFactory.cs
- GridView.cs
- ColumnWidthChangedEvent.cs
- SqlFacetAttribute.cs
- ImmutableCollection.cs
- ApplicationManager.cs
- NullableIntSumAggregationOperator.cs
- ISAPIApplicationHost.cs
- ScriptReferenceBase.cs
- SyndicationItem.cs
- ManifestResourceInfo.cs
- Pair.cs
- Encoding.cs
- ToolStripItemTextRenderEventArgs.cs
- ConstNode.cs
- NavigationCommands.cs
- StrokeFIndices.cs
- ConditionedDesigner.cs
- CompositeDispatchFormatter.cs
- ObjectStateEntryDbDataRecord.cs
- Unit.cs
- XmlArrayItemAttribute.cs
- VisualCollection.cs
- PreviewControlDesigner.cs
- Point3DAnimation.cs
- WebPartTransformerCollection.cs
- MenuItem.cs
- DataGridViewCellParsingEventArgs.cs
- FontInfo.cs
- PackageRelationshipSelector.cs