Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / TemplateBindingExpression.cs / 1305600 / TemplateBindingExpression.cs
/****************************************************************************\
*
* File: TemplateBindingExpression.cs
*
* Expression to represent a TemplateBindingExtension during editing of a
* template.
*
* 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
{
///
/// A TemplateBinding is used in templates (e.g. ControlTemplate). When the content of
/// a template is instantiated for inspection, the template bindings are represented with
/// a TemplateBindingExpression. (In this case, the expression returns the property's default
/// value.)
///
[TypeConverter(typeof(TemplateBindingExpressionConverter))]
public class TemplateBindingExpression : Expression
{
private TemplateBindingExtension _templateBindingExtension;
internal TemplateBindingExpression( TemplateBindingExtension templateBindingExtension )
{
_templateBindingExtension = templateBindingExtension;
}
///
/// Constructor for TemplateBindingExpression
///
public TemplateBindingExtension TemplateBindingExtension
{
get { return _templateBindingExtension; }
}
///
/// Called to evaluate the Expression value
///
/// DependencyObject being queried
/// Property being queried
/// Computed value. Default (of the target) if unavailable.
internal override object GetValue(DependencyObject d, DependencyProperty dp)
{
return dp.GetDefaultValue(d.DependencyObjectType);
}
}
}
// 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
- DefaultValidator.cs
- VirtualizingStackPanel.cs
- SmiEventSink.cs
- OracleBFile.cs
- SqlDataReader.cs
- DataServiceConfiguration.cs
- XomlCompilerError.cs
- AlphabeticalEnumConverter.cs
- TextLine.cs
- SchemaInfo.cs
- CompletedAsyncResult.cs
- DataKeyCollection.cs
- MessageLogger.cs
- Visual3D.cs
- TagMapInfo.cs
- AutomationPropertyInfo.cs
- DataColumnMapping.cs
- ImageSourceValueSerializer.cs
- PartManifestEntry.cs
- ErrorWebPart.cs
- SByteStorage.cs
- ICspAsymmetricAlgorithm.cs
- JsonFormatReaderGenerator.cs
- InvalidDataException.cs
- ApplicationDirectory.cs
- TargetInvocationException.cs
- PathSegmentCollection.cs
- ProfileGroupSettings.cs
- BamlLocalizerErrorNotifyEventArgs.cs
- DataGridColumnCollection.cs
- FileUpload.cs
- ObjectConverter.cs
- Canvas.cs
- HeaderedContentControl.cs
- AmbientEnvironment.cs
- DictionaryEntry.cs
- InternalsVisibleToAttribute.cs
- RecognizedWordUnit.cs
- SqlComparer.cs
- UdpTransportBindingElement.cs
- DesignerDataColumn.cs
- HitTestFilterBehavior.cs
- KnownColorTable.cs
- DescendantQuery.cs
- LocalizationParserHooks.cs
- Deflater.cs
- ExclusiveTcpListener.cs
- SetterBaseCollection.cs
- PageParser.cs
- ButtonBaseAutomationPeer.cs
- InitializerFacet.cs
- AQNBuilder.cs
- StrictModeSecurityHeaderElementInferenceEngine.cs
- NotificationContext.cs
- ContentTextAutomationPeer.cs
- Selector.cs
- UIElementCollection.cs
- HttpModuleAction.cs
- CanonicalFontFamilyReference.cs
- ExpressionEvaluator.cs
- XmlSchemaGroup.cs
- HwndStylusInputProvider.cs
- ProgressBar.cs
- SystemIPGlobalStatistics.cs
- AttributeSetAction.cs
- FunctionImportElement.cs
- DesignerProperties.cs
- mongolianshape.cs
- TrackBar.cs
- basenumberconverter.cs
- TagPrefixAttribute.cs
- ExpressionBuilderContext.cs
- RepeaterItem.cs
- SizeChangedEventArgs.cs
- MetaType.cs
- ServiceDescriptionReflector.cs
- ClientScriptManager.cs
- DataBinding.cs
- RtfToXamlReader.cs
- ZipIOExtraFieldZip64Element.cs
- DataServiceExpressionVisitor.cs
- CharacterMetricsDictionary.cs
- EditCommandColumn.cs
- ObjectStateEntryDbDataRecord.cs
- DocumentViewerBase.cs
- DataGridViewSelectedColumnCollection.cs
- UnsafeNetInfoNativeMethods.cs
- SymLanguageVendor.cs
- SecurityTokenProvider.cs
- JsonDataContract.cs
- DataGridPreparingCellForEditEventArgs.cs
- Win32Exception.cs
- XmlDownloadManager.cs
- OleDbEnumerator.cs
- SetIterators.cs
- EdmProviderManifest.cs
- Function.cs
- ShapingWorkspace.cs
- StylusShape.cs
- ComponentSerializationService.cs