Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- SelectionListDesigner.cs
- WebControl.cs
- AsyncPostBackErrorEventArgs.cs
- AsyncResult.cs
- FindProgressChangedEventArgs.cs
- ObsoleteAttribute.cs
- ButtonChrome.cs
- UserControl.cs
- Inline.cs
- RayMeshGeometry3DHitTestResult.cs
- ListDictionaryInternal.cs
- BamlResourceContent.cs
- ListSourceHelper.cs
- WebBrowserSiteBase.cs
- StoreAnnotationsMap.cs
- SmiConnection.cs
- X509RecipientCertificateServiceElement.cs
- MaterialGroup.cs
- ApplicationActivator.cs
- EnumUnknown.cs
- DropShadowEffect.cs
- WSMessageEncoding.cs
- ListChangedEventArgs.cs
- SymbolDocumentGenerator.cs
- ImageList.cs
- SortQueryOperator.cs
- _Connection.cs
- ManipulationDevice.cs
- OutOfMemoryException.cs
- BitConverter.cs
- CodeRemoveEventStatement.cs
- HttpModulesSection.cs
- ControlFilterExpression.cs
- SQLGuid.cs
- MobileFormsAuthentication.cs
- FixedSchema.cs
- LocalIdKeyIdentifierClause.cs
- CodeAccessPermission.cs
- ScrollBarRenderer.cs
- AdjustableArrowCap.cs
- SetterBase.cs
- WebHeaderCollection.cs
- MemberDescriptor.cs
- TreeViewCancelEvent.cs
- NavigatorInput.cs
- MethodExpr.cs
- TextSelection.cs
- EditCommandColumn.cs
- ReadOnlyTernaryTree.cs
- QueryOpcode.cs
- EmptyControlCollection.cs
- Int64AnimationUsingKeyFrames.cs
- EdmRelationshipRoleAttribute.cs
- ArgumentOutOfRangeException.cs
- metadatamappinghashervisitor.cs
- CatchBlock.cs
- Interlocked.cs
- NamedPermissionSet.cs
- XmlElementAttributes.cs
- ProgressChangedEventArgs.cs
- AmbientValueAttribute.cs
- SpecialNameAttribute.cs
- XmlSerializer.cs
- DynamicFilter.cs
- SendMessageChannelCache.cs
- StringBuilder.cs
- User.cs
- ClusterRegistryConfigurationProvider.cs
- Style.cs
- DataBindingHandlerAttribute.cs
- BitVector32.cs
- StringValidatorAttribute.cs
- TrackingLocationCollection.cs
- Empty.cs
- ConnectionStringsExpressionBuilder.cs
- WorkflowInstance.cs
- AggregationMinMaxHelpers.cs
- DbDataRecord.cs
- RoutedUICommand.cs
- XmlHelper.cs
- SqlStatistics.cs
- MultiAsyncResult.cs
- HMAC.cs
- Rect3D.cs
- TextServicesCompartmentContext.cs
- Mouse.cs
- NamespaceQuery.cs
- MessageFormatterConverter.cs
- SqlTriggerContext.cs
- SessionSymmetricMessageSecurityProtocolFactory.cs
- ColumnClickEvent.cs
- ResourceSet.cs
- StringValidator.cs
- TiffBitmapEncoder.cs
- WpfPayload.cs
- TemplateParser.cs
- SQLMembershipProvider.cs
- ResourceExpressionBuilder.cs
- RelationshipDetailsCollection.cs
- InkCanvasInnerCanvas.cs