Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / wpf / src / Framework / System / Windows / TemplateBindingExpression.cs / 1 / 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.
/****************************************************************************\
*
* 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
- NonPrimarySelectionGlyph.cs
- QilExpression.cs
- ResourceDisplayNameAttribute.cs
- HandlerFactoryWrapper.cs
- Model3DGroup.cs
- SecurityBindingElement.cs
- MetabaseServerConfig.cs
- HttpClientCertificate.cs
- TypeGeneratedEventArgs.cs
- MarkupExtensionParser.cs
- InstallerTypeAttribute.cs
- WebBrowser.cs
- DataObjectCopyingEventArgs.cs
- QueueProcessor.cs
- BinaryHeap.cs
- PackageRelationshipCollection.cs
- SystemIPAddressInformation.cs
- DefaultAsyncDataDispatcher.cs
- XslException.cs
- Message.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- ConfigurationLockCollection.cs
- DataServiceResponse.cs
- CompatibleComparer.cs
- TableDetailsCollection.cs
- OracleConnectionString.cs
- ModifiableIteratorCollection.cs
- Rijndael.cs
- BuilderPropertyEntry.cs
- diagnosticsswitches.cs
- DataDocumentXPathNavigator.cs
- AppDomain.cs
- HealthMonitoringSectionHelper.cs
- TranslateTransform3D.cs
- MiniConstructorInfo.cs
- TypeSystem.cs
- DesignBindingConverter.cs
- TemplateLookupAction.cs
- ProxySimple.cs
- SafeFileMappingHandle.cs
- XmlNamespaceManager.cs
- ErrorFormatterPage.cs
- PartialToken.cs
- TextViewBase.cs
- GridViewPageEventArgs.cs
- MenuItemBinding.cs
- LocalClientSecuritySettingsElement.cs
- LinqDataSource.cs
- Identity.cs
- IndexOutOfRangeException.cs
- SqlGatherConsumedAliases.cs
- XmlDataSourceView.cs
- FileInfo.cs
- TableRowGroupCollection.cs
- Win32Native.cs
- Substitution.cs
- NonParentingControl.cs
- XmlWrappingReader.cs
- GPRECT.cs
- GPPOINT.cs
- AsyncPostBackTrigger.cs
- ContractMapping.cs
- ConfigPathUtility.cs
- EventKeyword.cs
- PerformanceCounterPermission.cs
- log.cs
- SettingsContext.cs
- BaseWebProxyFinder.cs
- OpacityConverter.cs
- ApplicationServiceManager.cs
- TextRangeEditTables.cs
- SystemNetworkInterface.cs
- EdgeModeValidation.cs
- SoapSchemaMember.cs
- ObjectAnimationBase.cs
- ControlValuePropertyAttribute.cs
- UnauthorizedWebPart.cs
- SqlConnectionHelper.cs
- BooleanToVisibilityConverter.cs
- CountAggregationOperator.cs
- PublisherMembershipCondition.cs
- GridViewColumnCollectionChangedEventArgs.cs
- EnumConverter.cs
- ConnectionStringsExpressionBuilder.cs
- Form.cs
- XmlChildEnumerator.cs
- TypeResolver.cs
- FileVersion.cs
- XPathEmptyIterator.cs
- DataGridViewLinkCell.cs
- TimestampInformation.cs
- Int16AnimationUsingKeyFrames.cs
- TextElementEnumerator.cs
- LabelAutomationPeer.cs
- ObjectPersistData.cs
- WindowsSysHeader.cs
- WsatProxy.cs
- ManipulationDeltaEventArgs.cs
- ModelService.cs
- CssTextWriter.cs