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
- XmlUtil.cs
- ProvidersHelper.cs
- DependencyPropertyChangedEventArgs.cs
- DynamicUpdateCommand.cs
- ColorEditor.cs
- UniqueConstraint.cs
- GZipDecoder.cs
- Parameter.cs
- DataRow.cs
- CompilerResults.cs
- documentsequencetextview.cs
- RawTextInputReport.cs
- Serializer.cs
- SqlRowUpdatingEvent.cs
- InstanceHandleConflictException.cs
- AssemblyCollection.cs
- TextLineBreak.cs
- LineInfo.cs
- PropertyItem.cs
- TraceHandlerErrorFormatter.cs
- PerfCounters.cs
- PropertyGrid.cs
- ProtocolsConfigurationHandler.cs
- XmlSerializationWriter.cs
- InputProcessorProfiles.cs
- SqlFunctions.cs
- XamlReaderConstants.cs
- DataPagerField.cs
- PointHitTestResult.cs
- StrokeCollectionDefaultValueFactory.cs
- CommonXSendMessage.cs
- SinglePhaseEnlistment.cs
- SmtpCommands.cs
- DetailsView.cs
- WebEventCodes.cs
- StringPropertyBuilder.cs
- ListControl.cs
- BindingOperations.cs
- SqlUtils.cs
- AnalyzedTree.cs
- DebuggerAttributes.cs
- FillErrorEventArgs.cs
- PropertyRef.cs
- QueryCacheManager.cs
- ApplicationBuildProvider.cs
- ExtendedTransformFactory.cs
- UserPersonalizationStateInfo.cs
- SecurityContext.cs
- RestHandler.cs
- UpdateExpressionVisitor.cs
- OleDbConnection.cs
- DataGridToolTip.cs
- ExpressionHelper.cs
- VectorAnimation.cs
- Scene3D.cs
- BevelBitmapEffect.cs
- InheritanceService.cs
- FormatVersion.cs
- NativeMethods.cs
- XmlSchemaValidationException.cs
- DataColumn.cs
- PointAnimationUsingPath.cs
- Encoder.cs
- ManipulationInertiaStartingEventArgs.cs
- NotImplementedException.cs
- CodeObject.cs
- EventDescriptor.cs
- XmlCollation.cs
- UnsignedPublishLicense.cs
- FlowLayoutPanelDesigner.cs
- ProcessInfo.cs
- ScrollProviderWrapper.cs
- EntityParameter.cs
- DatatypeImplementation.cs
- OracleMonthSpan.cs
- DoubleCollectionConverter.cs
- ReadOnlyCollection.cs
- Stream.cs
- DefaultProxySection.cs
- OpenTypeLayoutCache.cs
- RemotingAttributes.cs
- VectorConverter.cs
- MouseEvent.cs
- DeferredTextReference.cs
- RolePrincipal.cs
- TableLayoutStyleCollection.cs
- OdbcEnvironmentHandle.cs
- TerminatorSinks.cs
- odbcmetadatacollectionnames.cs
- TraceHelpers.cs
- LocationInfo.cs
- BitmapEffectInput.cs
- FunctionImportElement.cs
- COM2IDispatchConverter.cs
- TextTreeText.cs
- SQLBinary.cs
- BasicHttpSecurityMode.cs
- SafeNativeMethods.cs
- ObjectStateEntryBaseUpdatableDataRecord.cs
- DefaultSerializationProviderAttribute.cs