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
- CompositeScriptReferenceEventArgs.cs
- Variant.cs
- DataGridCaption.cs
- DataGridRowClipboardEventArgs.cs
- IPCCacheManager.cs
- FormClosingEvent.cs
- DesignTable.cs
- FillRuleValidation.cs
- TrackingDataItemValue.cs
- FilterableAttribute.cs
- MimeTypeMapper.cs
- ButtonBase.cs
- SafeEventHandle.cs
- SafeMemoryMappedFileHandle.cs
- TextDecorationCollectionConverter.cs
- DBCSCodePageEncoding.cs
- StringConverter.cs
- ArraySet.cs
- ComplexType.cs
- XmlSchemaComplexContentRestriction.cs
- PageCodeDomTreeGenerator.cs
- ObjectStateEntryDbDataRecord.cs
- IProducerConsumerCollection.cs
- ManagedFilter.cs
- DocComment.cs
- DecimalAnimationUsingKeyFrames.cs
- securitycriticaldataformultiplegetandset.cs
- OleStrCAMarshaler.cs
- Keyboard.cs
- NaturalLanguageHyphenator.cs
- MenuItem.cs
- SpeechSeg.cs
- SoapEnumAttribute.cs
- DocumentXmlWriter.cs
- SqlDataSource.cs
- Walker.cs
- OperationInfo.cs
- DrawItemEvent.cs
- TreeViewDesigner.cs
- LinearGradientBrush.cs
- DefaultWorkflowSchedulerService.cs
- OracleLob.cs
- AssertHelper.cs
- RegistrationServices.cs
- SqlRowUpdatedEvent.cs
- shaperfactoryquerycacheentry.cs
- RuleSetCollection.cs
- Fonts.cs
- SqlRetyper.cs
- UserControl.cs
- IisTraceWebEventProvider.cs
- ExtractCollection.cs
- UrlMappingsSection.cs
- JobPageOrder.cs
- KeyPullup.cs
- Menu.cs
- ChannelPoolSettings.cs
- ObjectQuery_EntitySqlExtensions.cs
- AsymmetricKeyExchangeFormatter.cs
- EventSinkHelperWriter.cs
- FirstMatchCodeGroup.cs
- HtmlInputSubmit.cs
- Camera.cs
- WebBrowserNavigatingEventHandler.cs
- InstanceDataCollection.cs
- WebControl.cs
- DbTransaction.cs
- Ticks.cs
- ResourceDescriptionAttribute.cs
- SelectionItemPattern.cs
- DocumentSequence.cs
- ExtensionQuery.cs
- DataGridViewRowHeaderCell.cs
- DesignerProperties.cs
- NGCPageContentSerializerAsync.cs
- NetCodeGroup.cs
- CqlGenerator.cs
- SafeCancelMibChangeNotify.cs
- SmiRecordBuffer.cs
- XmlSchema.cs
- XmlQueryOutput.cs
- CompilationUnit.cs
- SplitContainer.cs
- DbReferenceCollection.cs
- AlphabeticalEnumConverter.cs
- AuthenticationModuleElementCollection.cs
- MimeAnyImporter.cs
- TextRunCache.cs
- WorkflowFileItem.cs
- SortAction.cs
- NullToBooleanConverter.cs
- Tokenizer.cs
- RenderContext.cs
- DataTrigger.cs
- Rect3D.cs
- ContentDesigner.cs
- securitymgrsite.cs
- BuiltInExpr.cs
- URIFormatException.cs
- PropertyIdentifier.cs