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
- ButtonField.cs
- OdbcPermission.cs
- SizeAnimationBase.cs
- ArrayMergeHelper.cs
- SQLByteStorage.cs
- SourceFileBuildProvider.cs
- CopyNamespacesAction.cs
- RuntimeIdentifierPropertyAttribute.cs
- WmpBitmapEncoder.cs
- DelegateHelpers.cs
- AdPostCacheSubstitution.cs
- GenerateTemporaryAssemblyTask.cs
- UnauthorizedAccessException.cs
- bidPrivateBase.cs
- StylusPlugin.cs
- IssuanceLicense.cs
- Ticks.cs
- PagerSettings.cs
- OrderedDictionary.cs
- LockedHandleGlyph.cs
- BamlReader.cs
- FormClosingEvent.cs
- WorkflowShape.cs
- ButtonColumn.cs
- Compensate.cs
- DisplayMemberTemplateSelector.cs
- ExtractedStateEntry.cs
- MenuItemBindingCollection.cs
- SiteMapNodeItemEventArgs.cs
- SignedPkcs7.cs
- OracleCommand.cs
- ListViewContainer.cs
- MobileCapabilities.cs
- DataServiceRequestException.cs
- TdsParserHelperClasses.cs
- Ticks.cs
- counter.cs
- PerCallInstanceContextProvider.cs
- TabControl.cs
- SettingsContext.cs
- MessageDesigner.cs
- storepermission.cs
- QilValidationVisitor.cs
- ExpressionCopier.cs
- QuaternionConverter.cs
- Iis7Helper.cs
- ButtonStandardAdapter.cs
- FixedSOMTableRow.cs
- Tokenizer.cs
- DataTransferEventArgs.cs
- VariableQuery.cs
- WebReferenceCollection.cs
- DesignParameter.cs
- SqlProvider.cs
- _NegotiateClient.cs
- SafeNativeMethodsOther.cs
- ObjectDataSourceDisposingEventArgs.cs
- NetTcpBindingElement.cs
- DiscoveryClientRequestChannel.cs
- TypeBrowser.xaml.cs
- Dynamic.cs
- ZipIOModeEnforcingStream.cs
- HostnameComparisonMode.cs
- ConnectionStringsExpressionEditor.cs
- TextEditorSelection.cs
- IntegrationExceptionEventArgs.cs
- WebPartCancelEventArgs.cs
- SendKeys.cs
- AutoGeneratedField.cs
- TableSectionStyle.cs
- HyperLinkField.cs
- PageThemeParser.cs
- DispatchChannelSink.cs
- StaticExtension.cs
- InfocardExtendedInformationCollection.cs
- ToolboxItem.cs
- MultipartContentParser.cs
- DBSqlParserTableCollection.cs
- EventlogProvider.cs
- ObjectCacheSettings.cs
- Guid.cs
- VisualStyleElement.cs
- CodeStatementCollection.cs
- KernelTypeValidation.cs
- WindowsButton.cs
- XhtmlBasicPanelAdapter.cs
- UriSection.cs
- DesignerVerb.cs
- FindCriteriaElement.cs
- TimelineGroup.cs
- COAUTHINFO.cs
- Ref.cs
- XsltContext.cs
- Convert.cs
- MembershipValidatePasswordEventArgs.cs
- AccessDataSource.cs
- AsyncOperationManager.cs
- PermissionSet.cs
- BasicHttpBinding.cs
- SoapSchemaImporter.cs