Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / wpf / src / Framework / System / Windows / TemplateBindingExpression.cs / 1 / 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
- SchemaInfo.cs
- NamespaceMapping.cs
- DragStartedEventArgs.cs
- SoapAttributeAttribute.cs
- CompModSwitches.cs
- SimpleBitVector32.cs
- SecurityRuntime.cs
- GridViewUpdateEventArgs.cs
- PointCollectionConverter.cs
- CompilerError.cs
- RuntimeHandles.cs
- HashSet.cs
- PriorityRange.cs
- MetadataItemEmitter.cs
- PixelFormatConverter.cs
- ExpressionVisitor.cs
- SqlStream.cs
- InstalledFontCollection.cs
- DockingAttribute.cs
- recordstate.cs
- SystemIcmpV6Statistics.cs
- Statements.cs
- GenerateScriptTypeAttribute.cs
- DirectoryObjectSecurity.cs
- FilteredReadOnlyMetadataCollection.cs
- EpmHelper.cs
- HtmlInputPassword.cs
- OracleTimeSpan.cs
- SelectionEditingBehavior.cs
- AsymmetricSignatureFormatter.cs
- PrintPreviewDialog.cs
- Keywords.cs
- TemplateXamlParser.cs
- BitmapEffectGeneralTransform.cs
- GridView.cs
- SafeProcessHandle.cs
- XPathNodePointer.cs
- ListViewInsertedEventArgs.cs
- CodeAttributeDeclarationCollection.cs
- Timer.cs
- CalendarSelectionChangedEventArgs.cs
- TextOutput.cs
- SafeEventHandle.cs
- JsonDeserializer.cs
- PKCS1MaskGenerationMethod.cs
- SelectionItemProviderWrapper.cs
- HttpChannelBindingToken.cs
- ConnectionPoint.cs
- DesignerLinkAdapter.cs
- XmlSchemaAnyAttribute.cs
- GraphicsContext.cs
- EntityObject.cs
- StringResourceManager.cs
- ReachSerializationUtils.cs
- AuthenticationSection.cs
- WindowHideOrCloseTracker.cs
- AssemblyResourceLoader.cs
- AssociationType.cs
- WindowsPrincipal.cs
- SecurityBindingElementImporter.cs
- ConfigurationManager.cs
- Timeline.cs
- ExceptionUtil.cs
- ArgumentNullException.cs
- DocumentPage.cs
- DataTableReader.cs
- GreenMethods.cs
- Stackframe.cs
- SmiSettersStream.cs
- TextRunProperties.cs
- TranslateTransform3D.cs
- SafeSystemMetrics.cs
- Int64AnimationBase.cs
- ComponentManagerBroker.cs
- NCryptSafeHandles.cs
- Expressions.cs
- Expression.cs
- CharacterBufferReference.cs
- EmptyCollection.cs
- BrushConverter.cs
- PropertyInformationCollection.cs
- SmtpNetworkElement.cs
- WebCodeGenerator.cs
- WebServiceReceive.cs
- CultureTable.cs
- CqlQuery.cs
- DigitShape.cs
- TextDecorationCollectionConverter.cs
- RuntimeCompatibilityAttribute.cs
- GcHandle.cs
- TdsEnums.cs
- DetailsViewRow.cs
- StreamGeometry.cs
- ResourceDisplayNameAttribute.cs
- ValidatedControlConverter.cs
- SqlCommand.cs
- DataGridColumnHeaderAutomationPeer.cs
- IndicCharClassifier.cs
- BufferedStream.cs
- AppDomainAttributes.cs