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
- IdentityHolder.cs
- SqlCacheDependencyDatabaseCollection.cs
- DateTimeOffset.cs
- SafeCoTaskMem.cs
- SendKeys.cs
- TypeToken.cs
- FormViewUpdateEventArgs.cs
- SliderAutomationPeer.cs
- xmlNames.cs
- SoapSchemaMember.cs
- Misc.cs
- UpdateProgress.cs
- HwndPanningFeedback.cs
- SerializationInfo.cs
- XmlSecureResolver.cs
- PropertyDescriptor.cs
- PropertyDescriptor.cs
- AssemblySettingAttributes.cs
- FileUtil.cs
- DataGridViewCellParsingEventArgs.cs
- SecurityDescriptor.cs
- JoinGraph.cs
- HTTPRemotingHandler.cs
- ElementsClipboardData.cs
- Fault.cs
- PagerSettings.cs
- TemplateBuilder.cs
- StrokeFIndices.cs
- ReadOnlyHierarchicalDataSourceView.cs
- DbConnectionPoolOptions.cs
- IsolatedStorageFile.cs
- WebConfigurationHost.cs
- XmlElementAttributes.cs
- ResourceManagerWrapper.cs
- DataRowCollection.cs
- HMAC.cs
- InputElement.cs
- WebBrowserEvent.cs
- ToolStripRendererSwitcher.cs
- ToolTipAutomationPeer.cs
- SoapHttpTransportImporter.cs
- EventLogEntry.cs
- HintTextMaxWidthConverter.cs
- RegistryExceptionHelper.cs
- MessageQueuePermissionEntryCollection.cs
- SHA384Managed.cs
- FlagsAttribute.cs
- XmlSubtreeReader.cs
- SettingsPropertyIsReadOnlyException.cs
- AssemblyFilter.cs
- SubqueryRules.cs
- UserNamePasswordValidationMode.cs
- PartialCachingControl.cs
- TextPointer.cs
- Tuple.cs
- IPAddress.cs
- ObjectDataProvider.cs
- DLinqTableProvider.cs
- DataGridViewCellStyleContentChangedEventArgs.cs
- DrawListViewColumnHeaderEventArgs.cs
- OLEDB_Enum.cs
- ToolboxItemAttribute.cs
- OrderPreservingMergeHelper.cs
- TypeConverters.cs
- TextParaLineResult.cs
- ProcessManager.cs
- CodeAttributeArgumentCollection.cs
- TableStyle.cs
- DirectionalLight.cs
- WaveHeader.cs
- ThreadExceptionDialog.cs
- TraceHandlerErrorFormatter.cs
- PlainXmlSerializer.cs
- HttpWebResponse.cs
- ImageAutomationPeer.cs
- DataException.cs
- JoinGraph.cs
- XmlDictionaryReaderQuotasElement.cs
- DataGridViewRowsRemovedEventArgs.cs
- FtpRequestCacheValidator.cs
- SiteMapProvider.cs
- ExcludePathInfo.cs
- WebPartCancelEventArgs.cs
- GuidelineSet.cs
- SelectorAutomationPeer.cs
- CombinedGeometry.cs
- NetworkInformationException.cs
- OutArgumentConverter.cs
- AssociationTypeEmitter.cs
- FontInfo.cs
- NetMsmqBindingElement.cs
- DirectoryNotFoundException.cs
- ColorMatrix.cs
- BookmarkInfo.cs
- XmlWrappingReader.cs
- XmlnsDefinitionAttribute.cs
- Internal.cs
- ScrollProviderWrapper.cs
- ZoomPercentageConverter.cs
- DataSourceUtil.cs