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
- CommandLineParser.cs
- LinqDataSourceView.cs
- TypeLoadException.cs
- ClientSettingsStore.cs
- TrustManagerPromptUI.cs
- DaylightTime.cs
- Console.cs
- Tuple.cs
- PropertyChangedEventManager.cs
- KeyMatchBuilder.cs
- HttpModule.cs
- OrderedDictionary.cs
- SystemInfo.cs
- Span.cs
- XmlSchemaAnyAttribute.cs
- ConnectionConsumerAttribute.cs
- NetworkInformationException.cs
- DbProviderSpecificTypePropertyAttribute.cs
- DynamicRenderer.cs
- MimeMapping.cs
- RenderData.cs
- CreateDataSourceDialog.cs
- CodeTypeReference.cs
- DiscardableAttribute.cs
- RegularExpressionValidator.cs
- CodePageUtils.cs
- SoapElementAttribute.cs
- DecoderBestFitFallback.cs
- OdbcErrorCollection.cs
- OptimizedTemplateContent.cs
- ObjectSecurity.cs
- PageFunction.cs
- Trace.cs
- LineSegment.cs
- TagPrefixAttribute.cs
- _NetRes.cs
- Matrix3DConverter.cs
- IdleTimeoutMonitor.cs
- SubpageParaClient.cs
- DataStorage.cs
- CommonDialog.cs
- ClientBuildManagerCallback.cs
- SerializationSectionGroup.cs
- DSACryptoServiceProvider.cs
- X509PeerCertificateElement.cs
- DesignerAttributeInfo.cs
- arc.cs
- Encoder.cs
- OleDbTransaction.cs
- LinqDataSourceSelectEventArgs.cs
- ToolStripDropDownMenu.cs
- RectIndependentAnimationStorage.cs
- Config.cs
- StylusPointPropertyInfo.cs
- HtmlContainerControl.cs
- SudsCommon.cs
- CodeDOMProvider.cs
- TextBox.cs
- Schema.cs
- SecureStringHasher.cs
- UInt32Storage.cs
- DataSourceCache.cs
- AssemblyBuilderData.cs
- IndexedGlyphRun.cs
- WebCategoryAttribute.cs
- WebPartHeaderCloseVerb.cs
- Viewport2DVisual3D.cs
- SearchForVirtualItemEventArgs.cs
- ScriptingJsonSerializationSection.cs
- AccessDataSourceWizardForm.cs
- OdbcHandle.cs
- AddInToken.cs
- DefaultEvaluationContext.cs
- WindowsPrincipal.cs
- ArrayWithOffset.cs
- FrameworkContentElement.cs
- TemplateBindingExpression.cs
- HttpCookiesSection.cs
- TextSpanModifier.cs
- OpenTypeCommon.cs
- TraceProvider.cs
- MeshGeometry3D.cs
- AssemblyCollection.cs
- ListInitExpression.cs
- SystemIPv6InterfaceProperties.cs
- KerberosRequestorSecurityToken.cs
- DeclarativeCatalogPart.cs
- SqlDataSource.cs
- initElementDictionary.cs
- PropertyMapper.cs
- UidManager.cs
- RenderTargetBitmap.cs
- Help.cs
- SymDocumentType.cs
- Reference.cs
- EmptyEnumerator.cs
- ActivityExecutorOperation.cs
- SafeLocalMemHandle.cs
- Mouse.cs
- MdImport.cs