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
- RoutingEndpointTrait.cs
- View.cs
- AutomationEvent.cs
- CollectionChangeEventArgs.cs
- ContentWrapperAttribute.cs
- TCPClient.cs
- EditingScopeUndoUnit.cs
- ConsoleKeyInfo.cs
- InternalDispatchObject.cs
- ViewUtilities.cs
- ViewService.cs
- Guid.cs
- X509ChainElement.cs
- GetLedgerRequest.cs
- ClientData.cs
- MaskedTextBoxDesigner.cs
- ApplicationManager.cs
- XDRSchema.cs
- ImageClickEventArgs.cs
- SafeCryptoHandles.cs
- HttpApplication.cs
- DataControlFieldCell.cs
- ObjRef.cs
- GenericEnumerator.cs
- DataBoundControlParameterTarget.cs
- CriticalFileToken.cs
- MethodExpression.cs
- oledbconnectionstring.cs
- Pointer.cs
- ApplicationServicesHostFactory.cs
- CustomSignedXml.cs
- TableAutomationPeer.cs
- MaskPropertyEditor.cs
- BitSet.cs
- AddInServer.cs
- PropertyIdentifier.cs
- EdmMember.cs
- RightsManagementEncryptionTransform.cs
- LOSFormatter.cs
- PerformanceCounterNameAttribute.cs
- UInt32Converter.cs
- FormsIdentity.cs
- RestHandler.cs
- activationcontext.cs
- _NegotiateClient.cs
- SchemaImporterExtensionElementCollection.cs
- CodeVariableReferenceExpression.cs
- ToolStripSplitButton.cs
- ListParaClient.cs
- COM2EnumConverter.cs
- Wizard.cs
- Point3D.cs
- IdleTimeoutMonitor.cs
- ReadOnlyPropertyMetadata.cs
- CheckBoxPopupAdapter.cs
- BinaryObjectInfo.cs
- SessionEndingEventArgs.cs
- FieldMetadata.cs
- InvokeHandlers.cs
- filewebresponse.cs
- OdbcConnectionHandle.cs
- CommandField.cs
- ConnectionProviderAttribute.cs
- DataGridViewSelectedCellCollection.cs
- QueryCacheKey.cs
- ChannelSinkStacks.cs
- PackWebRequestFactory.cs
- XmlBoundElement.cs
- IdnMapping.cs
- PopupControlService.cs
- GACIdentityPermission.cs
- ByteConverter.cs
- JoinTreeSlot.cs
- MeasureItemEvent.cs
- ControlValuePropertyAttribute.cs
- RootBrowserWindow.cs
- CTreeGenerator.cs
- HttpContextServiceHost.cs
- DbSetClause.cs
- FileAccessException.cs
- DataGridViewCellStateChangedEventArgs.cs
- UIElement3DAutomationPeer.cs
- EnumerableRowCollection.cs
- AbsoluteQuery.cs
- UnmanagedHandle.cs
- Optimizer.cs
- WebConfigurationFileMap.cs
- QualificationDataItem.cs
- MatrixConverter.cs
- DataGridColumnDropSeparator.cs
- SiteMapProvider.cs
- SelectionItemProviderWrapper.cs
- InheritanceService.cs
- ConsumerConnectionPointCollection.cs
- GenericEnumConverter.cs
- GrammarBuilderDictation.cs
- WebPartCatalogAddVerb.cs
- TextChangedEventArgs.cs
- MILUtilities.cs
- StringConverter.cs