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
- DllNotFoundException.cs
- RelatedCurrencyManager.cs
- SafeHandles.cs
- HtmlTableRow.cs
- AutoFocusStyle.xaml.cs
- HttpException.cs
- CodeStatement.cs
- SslStream.cs
- EncodingInfo.cs
- TimeoutConverter.cs
- MouseActionConverter.cs
- AttachedAnnotation.cs
- ControlPersister.cs
- UnsafeNativeMethods.cs
- WindowExtensionMethods.cs
- TableAdapterManagerGenerator.cs
- RegistrationServices.cs
- SortAction.cs
- panel.cs
- GenericFlowSwitchHelper.cs
- SmiEventSink_Default.cs
- XmlSchemaExporter.cs
- CellParagraph.cs
- Tokenizer.cs
- EntityCommandCompilationException.cs
- ContractReference.cs
- Block.cs
- httpstaticobjectscollection.cs
- SecurityAppliedMessage.cs
- ConsoleEntryPoint.cs
- UrlAuthorizationModule.cs
- PersonalizationAdministration.cs
- ParameterCollection.cs
- HwndStylusInputProvider.cs
- ItemCheckedEvent.cs
- SurrogateEncoder.cs
- SocketInformation.cs
- DocumentXmlWriter.cs
- DataBinder.cs
- Matrix.cs
- DeobfuscatingStream.cs
- ReflectTypeDescriptionProvider.cs
- CultureSpecificCharacterBufferRange.cs
- ButtonBase.cs
- UIElementParagraph.cs
- Screen.cs
- diagnosticsswitches.cs
- CodeAttributeDeclaration.cs
- NativeMethods.cs
- XmlNamespaceDeclarationsAttribute.cs
- ZoneButton.cs
- ListViewCancelEventArgs.cs
- IProvider.cs
- HtmlShim.cs
- Application.cs
- DescriptionAttribute.cs
- FileStream.cs
- WindowProviderWrapper.cs
- IncomingWebRequestContext.cs
- FormsAuthenticationCredentials.cs
- FixedSOMGroup.cs
- SqlDataRecord.cs
- NameNode.cs
- KeyGestureConverter.cs
- HandledMouseEvent.cs
- DocumentSequence.cs
- MarkerProperties.cs
- CodeIterationStatement.cs
- BuildManager.cs
- KeyInterop.cs
- HtmlSelect.cs
- DataControlCommands.cs
- SchemaManager.cs
- ToolStripItemTextRenderEventArgs.cs
- BindValidationContext.cs
- HttpProfileBase.cs
- DbException.cs
- OrderedDictionary.cs
- SymbolPair.cs
- ElementMarkupObject.cs
- OutputCacheProfileCollection.cs
- ResXResourceReader.cs
- SynchronizationLockException.cs
- XamlNamespaceHelper.cs
- ObjectAnimationUsingKeyFrames.cs
- InstanceLockedException.cs
- EmptyReadOnlyDictionaryInternal.cs
- DnsEndpointIdentity.cs
- ResetableIterator.cs
- WorkflowQueuingService.cs
- IgnorePropertiesAttribute.cs
- DataGridViewButtonCell.cs
- Region.cs
- PictureBox.cs
- SimpleWorkerRequest.cs
- UpnEndpointIdentityExtension.cs
- httpserverutility.cs
- XmlTypeMapping.cs
- ColorConvertedBitmap.cs
- SmtpFailedRecipientsException.cs