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
- GiveFeedbackEvent.cs
- DateTimeConverter.cs
- Wildcard.cs
- MsmqInputChannelBase.cs
- Helper.cs
- FileDialog.cs
- DocumentViewerBaseAutomationPeer.cs
- BaseProcessProtocolHandler.cs
- CngAlgorithmGroup.cs
- FixedDocumentSequencePaginator.cs
- CorrelationToken.cs
- AliasGenerator.cs
- ScriptManager.cs
- HighlightComponent.cs
- PropertyValueUIItem.cs
- _AuthenticationState.cs
- DeferredBinaryDeserializerExtension.cs
- VerifyHashRequest.cs
- ReadOnlyDictionary.cs
- DynamicUpdateCommand.cs
- RequestContext.cs
- TypographyProperties.cs
- UserCancellationException.cs
- UriSectionReader.cs
- AVElementHelper.cs
- WebBrowserEvent.cs
- FunctionNode.cs
- SplineKeyFrames.cs
- AssemblyInfo.cs
- PeerObject.cs
- PrintDialog.cs
- MarkupObject.cs
- counter.cs
- ScriptModule.cs
- Barrier.cs
- Win32Exception.cs
- ManifestResourceInfo.cs
- InvokeMemberBinder.cs
- EdmPropertyAttribute.cs
- ToolBarButtonDesigner.cs
- DBConcurrencyException.cs
- OdbcHandle.cs
- DataShape.cs
- ReaderWriterLockSlim.cs
- TextCharacters.cs
- ResXResourceReader.cs
- ColorBuilder.cs
- ControlBindingsCollection.cs
- WebHttpSecurityModeHelper.cs
- SerialErrors.cs
- ApplicationFileParser.cs
- XmlDataDocument.cs
- AnalyzedTree.cs
- XmlWrappingReader.cs
- NotFiniteNumberException.cs
- WmiEventSink.cs
- MatrixCamera.cs
- CommentGlyph.cs
- FullTextLine.cs
- Atom10FeedFormatter.cs
- _ServiceNameStore.cs
- ImageDesigner.cs
- Configuration.cs
- MultiView.cs
- RTTypeWrapper.cs
- InputDevice.cs
- ViewManager.cs
- FormsAuthentication.cs
- _BaseOverlappedAsyncResult.cs
- Membership.cs
- XPathConvert.cs
- TraceUtility.cs
- XmlSchemaComplexType.cs
- ErrorWebPart.cs
- RPIdentityRequirement.cs
- StringFreezingAttribute.cs
- GridView.cs
- SqlParameter.cs
- EntityRecordInfo.cs
- ResourceFallbackManager.cs
- EntityTypeEmitter.cs
- BeginEvent.cs
- basecomparevalidator.cs
- Automation.cs
- RelatedView.cs
- InputChannelBinder.cs
- MetabaseServerConfig.cs
- WindowsStartMenu.cs
- DbDataAdapter.cs
- FormsAuthenticationEventArgs.cs
- AuthenticationException.cs
- LogFlushAsyncResult.cs
- XmlDownloadManager.cs
- LightweightCodeGenerator.cs
- PropertyDescriptorCollection.cs
- ConfigXmlElement.cs
- TypeToStringValueConverter.cs
- CompoundFileIOPermission.cs
- ProtocolInformationReader.cs
- XmlSerializerFactory.cs