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
- ComboBoxItem.cs
- SqlMethodCallConverter.cs
- CapabilitiesUse.cs
- NameTable.cs
- XMLSchema.cs
- SolidBrush.cs
- AvTraceDetails.cs
- NonClientArea.cs
- TogglePattern.cs
- TrimSurroundingWhitespaceAttribute.cs
- Privilege.cs
- ScriptingRoleServiceSection.cs
- ScriptManagerProxy.cs
- TextElementEnumerator.cs
- XhtmlConformanceSection.cs
- OleDbErrorCollection.cs
- DetailsViewModeEventArgs.cs
- RijndaelManagedTransform.cs
- GifBitmapEncoder.cs
- XmlSchemaSubstitutionGroup.cs
- SelectionProviderWrapper.cs
- CompilerCollection.cs
- AnonymousIdentificationSection.cs
- XPathParser.cs
- AnnotationResource.cs
- RepeatBehavior.cs
- ArrangedElement.cs
- DataGridItem.cs
- PrintPreviewGraphics.cs
- PhonemeEventArgs.cs
- AffineTransform3D.cs
- InvalidOleVariantTypeException.cs
- VectorAnimationUsingKeyFrames.cs
- XamlContextStack.cs
- Funcletizer.cs
- Stylesheet.cs
- Link.cs
- SetterBaseCollection.cs
- WebServiceFault.cs
- RewritingValidator.cs
- HostSecurityManager.cs
- ReadOnlyTernaryTree.cs
- ExpressionBuilder.cs
- PropertyAccessVisitor.cs
- ThreadAbortException.cs
- TextSimpleMarkerProperties.cs
- ImageListUtils.cs
- SearchForVirtualItemEventArgs.cs
- DynamicRendererThreadManager.cs
- XmlTypeAttribute.cs
- UncommonField.cs
- HttpContextServiceHost.cs
- EventLogConfiguration.cs
- DBNull.cs
- DataBindingCollection.cs
- SimpleRecyclingCache.cs
- KeyValuePair.cs
- WeakEventManager.cs
- CapiHashAlgorithm.cs
- securitycriticaldataClass.cs
- XamlInt32CollectionSerializer.cs
- FontStretch.cs
- AlternateView.cs
- TransactionInformation.cs
- ControlsConfig.cs
- FigureParagraph.cs
- HttpRequestCacheValidator.cs
- Event.cs
- TextLine.cs
- CodeGenHelper.cs
- WebDisplayNameAttribute.cs
- XmlSchemaSimpleTypeList.cs
- BitmapEffect.cs
- ServiceDefaults.cs
- Model3DGroup.cs
- XmlDataProvider.cs
- WebScriptMetadataInstanceContextProvider.cs
- RequestValidator.cs
- ToolStripDropDownClosingEventArgs.cs
- Line.cs
- SafeLocalMemHandle.cs
- FlowDocumentScrollViewerAutomationPeer.cs
- SqlConnectionString.cs
- Zone.cs
- VectorConverter.cs
- COM2ExtendedUITypeEditor.cs
- XmlCDATASection.cs
- OdbcConnection.cs
- WindowsNonControl.cs
- DataIdProcessor.cs
- CompressStream.cs
- AdjustableArrowCap.cs
- RangeValidator.cs
- DeflateInput.cs
- InternalConfigSettingsFactory.cs
- PresentationTraceSources.cs
- HtmlLink.cs
- OperationInvokerBehavior.cs
- SessionStateSection.cs
- BamlResourceSerializer.cs