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
- XamlWrapperReaders.cs
- NamespaceInfo.cs
- MessageFilter.cs
- ToolStripDropDownItem.cs
- MediaEntryAttribute.cs
- CustomAttributeBuilder.cs
- RequiredAttributeAttribute.cs
- StagingAreaInputItem.cs
- X509ServiceCertificateAuthentication.cs
- TdsParserStateObject.cs
- EncryptedReference.cs
- SortedList.cs
- LongMinMaxAggregationOperator.cs
- FormViewActionList.cs
- PageParserFilter.cs
- DesignerDataTableBase.cs
- SystemWebSectionGroup.cs
- UserControl.cs
- MasterPageBuildProvider.cs
- ConfigurationErrorsException.cs
- XmlAutoDetectWriter.cs
- InvalidProgramException.cs
- TraceListeners.cs
- EntityDesignerBuildProvider.cs
- OSFeature.cs
- HyperLinkColumn.cs
- SpellerHighlightLayer.cs
- ScaleTransform.cs
- DataGridRow.cs
- CompilerTypeWithParams.cs
- Point4DValueSerializer.cs
- MenuRendererClassic.cs
- SQLBinary.cs
- _NetRes.cs
- HtmlWindowCollection.cs
- Material.cs
- Config.cs
- EnumerableRowCollection.cs
- XhtmlCssHandler.cs
- WorkflowRuntimeServiceElement.cs
- _LocalDataStore.cs
- PartitionedDataSource.cs
- AliasedExpr.cs
- EntityDesignerBuildProvider.cs
- ExpressionPrefixAttribute.cs
- PhysicalFontFamily.cs
- DictionaryBase.cs
- GZipDecoder.cs
- HashCodeCombiner.cs
- VirtualizingStackPanel.cs
- BCLDebug.cs
- IDQuery.cs
- StylusPointPropertyId.cs
- XsdBuildProvider.cs
- ProgressBarHighlightConverter.cs
- ControlBuilder.cs
- EpmCustomContentDeSerializer.cs
- HexParser.cs
- LogicalChannelCollection.cs
- PermissionRequestEvidence.cs
- UnsafeNativeMethods.cs
- TransactionCache.cs
- CacheRequest.cs
- Win32Exception.cs
- _FixedSizeReader.cs
- Model3DCollection.cs
- SemaphoreFullException.cs
- InkCanvasAutomationPeer.cs
- TextServicesManager.cs
- NavigatorInput.cs
- SQLConvert.cs
- ChangeProcessor.cs
- WorkflowRuntimeBehavior.cs
- Trace.cs
- figurelengthconverter.cs
- SmiEventSink_Default.cs
- ServerType.cs
- sitestring.cs
- TextTreeRootTextBlock.cs
- Message.cs
- NotifyParentPropertyAttribute.cs
- EventDescriptor.cs
- RijndaelManagedTransform.cs
- SqlUtil.cs
- Set.cs
- XmlWellformedWriter.cs
- SimpleTextLine.cs
- ContentFileHelper.cs
- MediaContext.cs
- ProfileManager.cs
- MultiDataTrigger.cs
- RichTextBoxConstants.cs
- RectValueSerializer.cs
- ZipIOLocalFileHeader.cs
- InputScopeAttribute.cs
- GridViewAutomationPeer.cs
- IconConverter.cs
- AsymmetricSignatureFormatter.cs
- TableItemPattern.cs
- WorkflowTransactionService.cs