Code:
/ 4.0 / 4.0 / 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. /****************************************************************************\ * * 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
- MarkupWriter.cs
- DefaultAuthorizationContext.cs
- PasswordDeriveBytes.cs
- PtsHost.cs
- Trace.cs
- MappingItemCollection.cs
- RayHitTestParameters.cs
- FontWeights.cs
- EnumMember.cs
- EntityDataSource.cs
- DataMember.cs
- TrustSection.cs
- TabletDevice.cs
- AudienceUriMode.cs
- CollaborationHelperFunctions.cs
- ScaleTransform.cs
- Image.cs
- CommaDelimitedStringAttributeCollectionConverter.cs
- TextRunCacheImp.cs
- PkcsUtils.cs
- CLSCompliantAttribute.cs
- ActivityExecutor.cs
- InputProviderSite.cs
- WizardForm.cs
- StringArrayEditor.cs
- MimeFormReflector.cs
- BinaryMessageFormatter.cs
- MessageProtectionOrder.cs
- ComponentResourceKey.cs
- X509CertificateValidationMode.cs
- AsyncCallback.cs
- AttributedMetaModel.cs
- CustomValidator.cs
- WebPart.cs
- FormsAuthenticationConfiguration.cs
- FileFormatException.cs
- FragmentQueryKB.cs
- DataSourceDescriptorCollection.cs
- ColorConvertedBitmap.cs
- HorizontalAlignConverter.cs
- GroupAggregateExpr.cs
- ChannelTracker.cs
- TransactionWaitAsyncResult.cs
- XmlSchemaElement.cs
- Deflater.cs
- TreeNodeBindingCollection.cs
- XmlSchemaObjectTable.cs
- BitmapFrameDecode.cs
- UpdateExpressionVisitor.cs
- AutomationElementCollection.cs
- MemberProjectedSlot.cs
- StylusDownEventArgs.cs
- Solver.cs
- TagMapCollection.cs
- ComponentChangingEvent.cs
- SHA384Cng.cs
- PopOutPanel.cs
- MappingException.cs
- NullableConverter.cs
- UpWmlMobileTextWriter.cs
- XmlSchemaSimpleType.cs
- ListItemCollection.cs
- NativeBuffer.cs
- QuaternionValueSerializer.cs
- ConfigPathUtility.cs
- StatusBarAutomationPeer.cs
- ThreadAttributes.cs
- TcpActivation.cs
- DataPointer.cs
- TextProperties.cs
- Operators.cs
- SimpleFileLog.cs
- ControlParser.cs
- TimelineCollection.cs
- XmlNotation.cs
- FileLogRecordHeader.cs
- MexBindingBindingCollectionElement.cs
- VariableExpressionConverter.cs
- PrincipalPermission.cs
- EventLog.cs
- TemplateLookupAction.cs
- RedirectionProxy.cs
- ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs
- XmlValidatingReaderImpl.cs
- SafeWaitHandle.cs
- DocumentXmlWriter.cs
- StringFreezingAttribute.cs
- InfoCardRequestException.cs
- RuleSetReference.cs
- PolicyLevel.cs
- PreloadedPackages.cs
- DiscoveryUtility.cs
- WindowsRebar.cs
- ImmComposition.cs
- ScriptComponentDescriptor.cs
- HtmlInputControl.cs
- ClientProtocol.cs
- BooleanFunctions.cs
- Sql8ConformanceChecker.cs
- WebPartVerbCollection.cs