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
- SecurityKeyType.cs
- AddInActivator.cs
- SQLUtility.cs
- ReferenceConverter.cs
- LinearGradientBrush.cs
- LinkLabel.cs
- InfoCardRSAPKCS1KeyExchangeFormatter.cs
- SqlFlattener.cs
- WsatExtendedInformation.cs
- DataSourceDescriptorCollection.cs
- UIElementParagraph.cs
- TextServicesContext.cs
- VectorAnimation.cs
- DataGridViewSelectedColumnCollection.cs
- SoapCodeExporter.cs
- IDataContractSurrogate.cs
- ScriptComponentDescriptor.cs
- EndPoint.cs
- FolderBrowserDialog.cs
- ScopeElementCollection.cs
- XmlSortKey.cs
- ItemCollection.cs
- XAMLParseException.cs
- SelectedDatesCollection.cs
- StylusPointPropertyId.cs
- FileNotFoundException.cs
- ClientScriptManager.cs
- DesignerCategoryAttribute.cs
- Errors.cs
- unsafenativemethodsother.cs
- SoapSchemaExporter.cs
- SystemTcpStatistics.cs
- IDQuery.cs
- PopOutPanel.cs
- SystemIdentity.cs
- DescendentsWalker.cs
- MergeFailedEvent.cs
- PersonalizationState.cs
- IWorkflowDebuggerService.cs
- RoutedEventHandlerInfo.cs
- EnvironmentPermission.cs
- CasesDictionary.cs
- Menu.cs
- PropertyValueChangedEvent.cs
- UmAlQuraCalendar.cs
- InputLangChangeEvent.cs
- PassportAuthenticationModule.cs
- MessageQueuePermission.cs
- ToolBarButton.cs
- DataGridHeaderBorder.cs
- DesignerActionPanel.cs
- SqlVersion.cs
- ScalarRestriction.cs
- HttpPostedFile.cs
- MissingSatelliteAssemblyException.cs
- SqlProvider.cs
- SemanticValue.cs
- NTAccount.cs
- RayMeshGeometry3DHitTestResult.cs
- EntityCommandCompilationException.cs
- StructuralObject.cs
- MergeLocalizationDirectives.cs
- ClientSettingsProvider.cs
- UniqueIdentifierService.cs
- Pair.cs
- TypeNameConverter.cs
- ByeOperationCD1AsyncResult.cs
- ComPlusServiceLoader.cs
- TypeElementCollection.cs
- ListSortDescriptionCollection.cs
- AttributedMetaModel.cs
- ObjectCloneHelper.cs
- IItemContainerGenerator.cs
- CompilerGlobalScopeAttribute.cs
- DataGridCell.cs
- ConnectionManagementElementCollection.cs
- ISessionStateStore.cs
- ProgressiveCrcCalculatingStream.cs
- NameValueConfigurationCollection.cs
- SectionVisual.cs
- StructuredTypeEmitter.cs
- Choices.cs
- HtmlTernaryTree.cs
- NullableFloatSumAggregationOperator.cs
- Route.cs
- Margins.cs
- TreeNodeBindingCollection.cs
- Switch.cs
- NestPullup.cs
- Speller.cs
- XPathConvert.cs
- AstTree.cs
- HttpPostedFileBase.cs
- XmlAttributeCollection.cs
- EditorAttribute.cs
- DesignerDataTable.cs
- Message.cs
- FrameworkEventSource.cs
- PartialTrustVisibleAssemblyCollection.cs
- ExpandedProjectionNode.cs