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
- TimeSpan.cs
- TableHeaderCell.cs
- SystemDropShadowChrome.cs
- ClientSettingsSection.cs
- RegexWorker.cs
- FileIOPermission.cs
- NoResizeHandleGlyph.cs
- SoapAttributes.cs
- SynchronizationScope.cs
- elementinformation.cs
- PropertySourceInfo.cs
- CssClassPropertyAttribute.cs
- ToolStripMenuItemDesigner.cs
- DelegateInArgument.cs
- TransformGroup.cs
- _CookieModule.cs
- XmlSchemaSimpleTypeList.cs
- UIElementIsland.cs
- FontFamilyIdentifier.cs
- DocumentOrderQuery.cs
- XamlPathDataSerializer.cs
- ProgressChangedEventArgs.cs
- DesignerLoader.cs
- FontDriver.cs
- LayoutEditorPart.cs
- HttpPostedFileBase.cs
- FacetChecker.cs
- OracleParameter.cs
- WebPartTransformerCollection.cs
- WebScriptMetadataFormatter.cs
- Rect3DValueSerializer.cs
- X509Extension.cs
- PerformanceCounterCategory.cs
- Resources.Designer.cs
- DataGridViewCellConverter.cs
- PartBasedPackageProperties.cs
- SiteMapNodeItemEventArgs.cs
- CollectionViewSource.cs
- SafeProcessHandle.cs
- Connector.xaml.cs
- TrackBar.cs
- TextEndOfLine.cs
- XmlSchemaValidator.cs
- wgx_commands.cs
- SwitchCase.cs
- DLinqColumnProvider.cs
- BuildProvider.cs
- FrameworkContentElement.cs
- ManagedFilter.cs
- CatalogUtil.cs
- AppDomainFactory.cs
- WorkflowRuntimeServiceElement.cs
- TabPage.cs
- NegotiationTokenAuthenticatorStateCache.cs
- AuthenticationConfig.cs
- CustomValidator.cs
- OleDbRowUpdatedEvent.cs
- TargetInvocationException.cs
- DefaultProxySection.cs
- SamlAuthorizationDecisionClaimResource.cs
- NoPersistHandle.cs
- ErrorInfoXmlDocument.cs
- XslAstAnalyzer.cs
- IssuedTokenClientCredential.cs
- SvcFileManager.cs
- CodeDomComponentSerializationService.cs
- HyperLinkColumn.cs
- QueryReaderSettings.cs
- OdbcConnectionFactory.cs
- SchemaTableOptionalColumn.cs
- SelectedGridItemChangedEvent.cs
- TypedRowGenerator.cs
- PreservationFileWriter.cs
- ToolStripManager.cs
- NTAccount.cs
- WaveHeader.cs
- DataGridViewCellStyleConverter.cs
- BrowserTree.cs
- SqlBuffer.cs
- MsmqIntegrationElement.cs
- Rule.cs
- Pen.cs
- MemoryPressure.cs
- XmlNamespaceDeclarationsAttribute.cs
- DllNotFoundException.cs
- EventLogPermissionEntryCollection.cs
- ScriptingScriptResourceHandlerSection.cs
- CodeCastExpression.cs
- UserInitiatedNavigationPermission.cs
- WebBrowserSiteBase.cs
- EnumBuilder.cs
- PrimarySelectionGlyph.cs
- ActivityInterfaces.cs
- XamlTypeMapper.cs
- SetUserLanguageRequest.cs
- SmtpNegotiateAuthenticationModule.cs
- Baml2006ReaderSettings.cs
- DataSourceXmlSerializationAttribute.cs
- ListDictionary.cs
- TimersDescriptionAttribute.cs