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
- FixedSOMPageElement.cs
- TransactionFlowProperty.cs
- HttpProcessUtility.cs
- SimpleType.cs
- FormClosedEvent.cs
- _BaseOverlappedAsyncResult.cs
- FloaterParaClient.cs
- PeerNameRegistration.cs
- ValueHandle.cs
- SecureStringHasher.cs
- XmlDocumentViewSchema.cs
- XmlCompatibilityReader.cs
- DispatcherEventArgs.cs
- ColorContextHelper.cs
- CurrentTimeZone.cs
- FullTextState.cs
- BindingList.cs
- MemberInfoSerializationHolder.cs
- EntityWrapperFactory.cs
- LabelExpression.cs
- UnsafeNativeMethodsMilCoreApi.cs
- IssuanceLicense.cs
- FixedSOMPageElement.cs
- dbenumerator.cs
- EntityDataSourceWrapperCollection.cs
- RSAOAEPKeyExchangeDeformatter.cs
- IQueryable.cs
- SettingsPropertyIsReadOnlyException.cs
- GraphicsState.cs
- DataGridTable.cs
- UIElementParagraph.cs
- AssemblyAttributes.cs
- EnterpriseServicesHelper.cs
- MultipartContentParser.cs
- TcpAppDomainProtocolHandler.cs
- TreeViewImageIndexConverter.cs
- MemberJoinTreeNode.cs
- PeerDuplexChannel.cs
- DataGridViewRowStateChangedEventArgs.cs
- List.cs
- Brushes.cs
- DateTimeParse.cs
- WebBrowser.cs
- SinglePageViewer.cs
- IpcManager.cs
- ApplyTemplatesAction.cs
- InProcStateClientManager.cs
- VirtualDirectoryMapping.cs
- Point.cs
- CheckPair.cs
- JsonSerializer.cs
- ToolCreatedEventArgs.cs
- EventSource.cs
- serverconfig.cs
- WindowsScrollBar.cs
- ChangeInterceptorAttribute.cs
- ConnectionPoint.cs
- DeflateEmulationStream.cs
- ProfileServiceManager.cs
- CellParagraph.cs
- InstanceDescriptor.cs
- GCHandleCookieTable.cs
- Error.cs
- ScriptResourceHandler.cs
- IRCollection.cs
- XmlTextEncoder.cs
- DbBuffer.cs
- SchemaEntity.cs
- XpsTokenContext.cs
- SqlClientFactory.cs
- DataTableMapping.cs
- DateTimeFormatInfoScanner.cs
- SqlInternalConnectionSmi.cs
- CustomErrorsSectionWrapper.cs
- GatewayDefinition.cs
- _NetworkingPerfCounters.cs
- ChannelServices.cs
- TypeDescriptionProviderAttribute.cs
- SqlFactory.cs
- SqlDataSource.cs
- ConnectionStringsSection.cs
- Propagator.ExtentPlaceholderCreator.cs
- MatrixAnimationUsingPath.cs
- XmlDeclaration.cs
- ParallelEnumerable.cs
- SqlServices.cs
- SystemResources.cs
- XmlSerializationWriter.cs
- FileSystemInfo.cs
- ZipIOZip64EndOfCentralDirectoryBlock.cs
- HtmlInputReset.cs
- FormatConvertedBitmap.cs
- DataGridViewCellStyle.cs
- XmlSchemaValidationException.cs
- WindowsTreeView.cs
- DependencyObjectPropertyDescriptor.cs
- _WinHttpWebProxyDataBuilder.cs
- OpacityConverter.cs
- LayoutEngine.cs
- ObjectDataSourceView.cs