Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- FieldToken.cs
- PrintPreviewDialog.cs
- ServiceModelSectionGroup.cs
- WebPartVerb.cs
- XPathNodePointer.cs
- SqlConnectionPoolProviderInfo.cs
- DataServiceConfiguration.cs
- DataGridColumnReorderingEventArgs.cs
- XmlWrappingReader.cs
- HttpModuleActionCollection.cs
- OrderedDictionaryStateHelper.cs
- TextEffect.cs
- DetailsViewModeEventArgs.cs
- NameValueCollection.cs
- ThreadNeutralSemaphore.cs
- DocumentApplication.cs
- SqlFileStream.cs
- BinaryWriter.cs
- Point.cs
- HttpStreams.cs
- LambdaReference.cs
- CodePropertyReferenceExpression.cs
- SqlRowUpdatedEvent.cs
- TimeManager.cs
- X509Utils.cs
- StackSpiller.Bindings.cs
- SerialErrors.cs
- MethodResolver.cs
- ServiceOperationListItem.cs
- FragmentQueryKB.cs
- ClientFormsAuthenticationCredentials.cs
- BamlLocalizationDictionary.cs
- ConfigurationManagerInternal.cs
- NoneExcludedImageIndexConverter.cs
- XmlSchemaObjectCollection.cs
- CatalogZoneBase.cs
- SerializationIncompleteException.cs
- QuerySelectOp.cs
- WebPartZoneBaseDesigner.cs
- DataKeyCollection.cs
- MSAANativeProvider.cs
- ShaperBuffers.cs
- RoleManagerEventArgs.cs
- ScriptReference.cs
- ISAPIWorkerRequest.cs
- ADMembershipUser.cs
- PeerDefaultCustomResolverClient.cs
- IdentityNotMappedException.cs
- SimpleWorkerRequest.cs
- Label.cs
- TimeSpanParse.cs
- TextBoxAutoCompleteSourceConverter.cs
- TextEffectCollection.cs
- localization.cs
- InputLanguageSource.cs
- MSAAEventDispatcher.cs
- ConversionContext.cs
- CryptoApi.cs
- WebPartConnectionsCloseVerb.cs
- SessionStateUtil.cs
- ValueUnavailableException.cs
- DataGridViewCellEventArgs.cs
- EventPropertyMap.cs
- StateWorkerRequest.cs
- PkcsMisc.cs
- VariantWrapper.cs
- EpmTargetTree.cs
- isolationinterop.cs
- ProviderConnectionPoint.cs
- DragEvent.cs
- PolyBezierSegmentFigureLogic.cs
- ISO2022Encoding.cs
- CompareValidator.cs
- SelectorAutomationPeer.cs
- AttributeCollection.cs
- StyleHelper.cs
- ObjectStateEntryBaseUpdatableDataRecord.cs
- Encoder.cs
- XmlWrappingReader.cs
- ParameterEditorUserControl.cs
- RegistryKey.cs
- SqlTransaction.cs
- UrlUtility.cs
- DelegateTypeInfo.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- BackgroundWorker.cs
- TCPClient.cs
- ImageAttributes.cs
- ContextConfiguration.cs
- Memoizer.cs
- DrawingVisualDrawingContext.cs
- CompoundFileStreamReference.cs
- RowTypeElement.cs
- ServerValidateEventArgs.cs
- XmlSerializationGeneratedCode.cs
- InteropAutomationProvider.cs
- MeshGeometry3D.cs
- TextSimpleMarkerProperties.cs
- TreeChangeInfo.cs
- RedBlackList.cs