Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- MobileFormsAuthentication.cs
- MimeTypeMapper.cs
- ChannelManager.cs
- ApplicationManager.cs
- RegexWriter.cs
- _FtpDataStream.cs
- ObjectDataSource.cs
- ValidationPropertyAttribute.cs
- CreateUserWizardAutoFormat.cs
- RegexCaptureCollection.cs
- EventInfo.cs
- DynamicRenderer.cs
- Helpers.cs
- StreamSecurityUpgradeAcceptorAsyncResult.cs
- StreamInfo.cs
- AssemblyBuilder.cs
- SqlDesignerDataSourceView.cs
- Viewport3DAutomationPeer.cs
- ProvidersHelper.cs
- ConnectionInterfaceCollection.cs
- WebScriptMetadataFormatter.cs
- Vector3DConverter.cs
- UnsafeNetInfoNativeMethods.cs
- PartialClassGenerationTask.cs
- UserNameServiceElement.cs
- MsmqAppDomainProtocolHandler.cs
- DbCommandTree.cs
- EdmError.cs
- DataGridCellAutomationPeer.cs
- InsufficientMemoryException.cs
- FileClassifier.cs
- Activity.cs
- TableDetailsRow.cs
- BamlVersionHeader.cs
- CalendarAutomationPeer.cs
- SafeLocalMemHandle.cs
- NotificationContext.cs
- CacheModeValueSerializer.cs
- CriticalHandle.cs
- EmbeddedMailObject.cs
- DataGridViewCellStyleChangedEventArgs.cs
- MsmqIntegrationChannelFactory.cs
- WebPartDescription.cs
- SiteMapNodeItemEventArgs.cs
- XsltConvert.cs
- AddInServer.cs
- Int32Rect.cs
- ReadOnlyHierarchicalDataSourceView.cs
- OracleRowUpdatingEventArgs.cs
- DataKeyCollection.cs
- LinearKeyFrames.cs
- DataGridViewSortCompareEventArgs.cs
- DataRowExtensions.cs
- ConfigXmlText.cs
- PatternMatchRules.cs
- ObjectDataSourceSelectingEventArgs.cs
- X509Certificate2Collection.cs
- BitConverter.cs
- ResXFileRef.cs
- TextServicesLoader.cs
- PagedControl.cs
- CommandBindingCollection.cs
- DateTimeValueSerializer.cs
- GridViewColumnHeader.cs
- DisposableCollectionWrapper.cs
- WizardStepBase.cs
- TypeSource.cs
- RowUpdatingEventArgs.cs
- DependencyObjectType.cs
- SelectionRangeConverter.cs
- InputMethodStateTypeInfo.cs
- CapabilitiesSection.cs
- TableLayoutStyleCollection.cs
- BamlBinaryWriter.cs
- RegistrySecurity.cs
- BinHexEncoder.cs
- TextSelectionHelper.cs
- SettingsProviderCollection.cs
- SqlCacheDependency.cs
- InfiniteTimeSpanConverter.cs
- SortedDictionary.cs
- ReplacementText.cs
- EntitySet.cs
- Compiler.cs
- PropertyEntry.cs
- KerberosReceiverSecurityToken.cs
- InvariantComparer.cs
- DataGridToolTip.cs
- MimeTypePropertyAttribute.cs
- BoundColumn.cs
- SolidColorBrush.cs
- ScrollChrome.cs
- IntegerValidator.cs
- BrowserDefinitionCollection.cs
- ZipIOExtraField.cs
- Win32Exception.cs
- BamlBinaryReader.cs
- AuthorizationRule.cs
- TableParagraph.cs
- SqlDataSourceSummaryPanel.cs