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
- ResourceCollectionInfo.cs
- DebugHandleTracker.cs
- MetadataArtifactLoaderComposite.cs
- ValueTable.cs
- ProfileSettings.cs
- _SslSessionsCache.cs
- DeclarativeCatalogPart.cs
- EditorPartChrome.cs
- LogReserveAndAppendState.cs
- DSGeneratorProblem.cs
- ScrollBarAutomationPeer.cs
- XamlNamespaceHelper.cs
- HttpApplicationStateBase.cs
- SharedPerformanceCounter.cs
- DataControlLinkButton.cs
- X509CertificateChain.cs
- PeerNeighborManager.cs
- Span.cs
- TypeBinaryExpression.cs
- HttpModuleCollection.cs
- UrlAuthorizationModule.cs
- COM2Properties.cs
- Converter.cs
- HitTestResult.cs
- SecurityValidationBehavior.cs
- ResizeGrip.cs
- StandardBindingOptionalReliableSessionElement.cs
- basemetadatamappingvisitor.cs
- ComponentResourceManager.cs
- SqlClientFactory.cs
- XmlComment.cs
- ToolStripContentPanelDesigner.cs
- CellCreator.cs
- Context.cs
- XmlSchemaAnnotated.cs
- RuntimeConfigLKG.cs
- DbgUtil.cs
- SHA512.cs
- X509Utils.cs
- SessionStateContainer.cs
- IdnMapping.cs
- GetCardDetailsRequest.cs
- WorkflowApplicationUnloadedException.cs
- HttpWebResponse.cs
- XmlSchemaDatatype.cs
- UTF8Encoding.cs
- TableRow.cs
- FactoryGenerator.cs
- RawStylusInputCustomDataList.cs
- LinkGrep.cs
- X509Certificate2.cs
- BezierSegment.cs
- XmlSchemaSequence.cs
- ViewUtilities.cs
- MatchAllMessageFilter.cs
- ViewCellSlot.cs
- WinFormsSpinner.cs
- CrossAppDomainChannel.cs
- WebPartConnectionsDisconnectVerb.cs
- BinaryFormatterSinks.cs
- FieldNameLookup.cs
- RolePrincipal.cs
- StateInitialization.cs
- sqlpipe.cs
- TreeNodeClickEventArgs.cs
- EncryptedReference.cs
- AssemblyUtil.cs
- DbConnectionStringCommon.cs
- Page.cs
- EdmPropertyAttribute.cs
- DateBoldEvent.cs
- HttpCacheParams.cs
- AnonymousIdentificationSection.cs
- Window.cs
- InvalidAsynchronousStateException.cs
- BuildManagerHost.cs
- RoutedEventHandlerInfo.cs
- SchemaElementDecl.cs
- InputBinding.cs
- NullableDecimalSumAggregationOperator.cs
- TemplateParser.cs
- BrowserCapabilitiesFactory.cs
- ObjectDataSourceDisposingEventArgs.cs
- DesigntimeLicenseContextSerializer.cs
- RawStylusInputCustomDataList.cs
- DigitalSignatureProvider.cs
- ResourceSet.cs
- WebPartVerbsEventArgs.cs
- ImportedNamespaceContextItem.cs
- basenumberconverter.cs
- AssertFilter.cs
- SessionSwitchEventArgs.cs
- InvokeWebServiceDesigner.cs
- EntityConnection.cs
- Baml2006KeyRecord.cs
- LogicalTreeHelper.cs
- PropertyIDSet.cs
- ToolboxItem.cs
- ConnectionInterfaceCollection.cs
- ToolStripLocationCancelEventArgs.cs