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
- RangeValueProviderWrapper.cs
- ServiceOperationViewControl.cs
- Types.cs
- And.cs
- SafeIUnknown.cs
- GridViewColumn.cs
- TableCell.cs
- ParallelDesigner.cs
- LambdaCompiler.Generated.cs
- Select.cs
- DataGridTableStyleMappingNameEditor.cs
- ImageField.cs
- TreeNodeConverter.cs
- XmlSchemaValidationException.cs
- StringStorage.cs
- TreeNodeEventArgs.cs
- XmlSchemaValidator.cs
- ToolTipService.cs
- ScrollBar.cs
- CmsUtils.cs
- Int32RectValueSerializer.cs
- ObjectStateFormatter.cs
- DeviceOverridableAttribute.cs
- DecoderReplacementFallback.cs
- ActiveXSite.cs
- ObjectKeyFrameCollection.cs
- Constraint.cs
- CodeGeneratorOptions.cs
- ModelTreeEnumerator.cs
- WaitHandleCannotBeOpenedException.cs
- Cell.cs
- ExceptionHandlers.cs
- Double.cs
- ProfilePropertySettingsCollection.cs
- embossbitmapeffect.cs
- DetailsViewUpdatedEventArgs.cs
- RelationshipType.cs
- ReadOnlyActivityGlyph.cs
- StreamUpgradeProvider.cs
- RadioButton.cs
- GridViewRow.cs
- RegexGroupCollection.cs
- SuppressMessageAttribute.cs
- WebPartVerbsEventArgs.cs
- XmlNamedNodeMap.cs
- TrustManagerMoreInformation.cs
- ApplicationInterop.cs
- Typeface.cs
- figurelengthconverter.cs
- SendKeys.cs
- EdmSchemaAttribute.cs
- TypeBrowserDialog.cs
- CodeAccessSecurityEngine.cs
- QuestionEventArgs.cs
- WindowsGraphics2.cs
- Assembly.cs
- EdmEntityTypeAttribute.cs
- SingleTagSectionHandler.cs
- ListManagerBindingsCollection.cs
- CannotUnloadAppDomainException.cs
- DesignerActionItemCollection.cs
- RowVisual.cs
- WindowHideOrCloseTracker.cs
- CommonGetThemePartSize.cs
- AttributeCollection.cs
- PropertyCondition.cs
- DynamicILGenerator.cs
- ApplicationManager.cs
- TextServicesCompartment.cs
- SimpleExpression.cs
- HttpValueCollection.cs
- StylusPointCollection.cs
- PathFigureCollectionValueSerializer.cs
- GACMembershipCondition.cs
- GroupItem.cs
- Compensate.cs
- Nodes.cs
- SafeProcessHandle.cs
- _HeaderInfoTable.cs
- EasingQuaternionKeyFrame.cs
- MiniLockedBorderGlyph.cs
- HttpHostedTransportConfiguration.cs
- BCryptNative.cs
- DateTime.cs
- TableLayoutStyle.cs
- KnownTypeDataContractResolver.cs
- RoleManagerSection.cs
- MembershipPasswordException.cs
- PrimitiveType.cs
- ObjectItemLoadingSessionData.cs
- ListBindingConverter.cs
- IndexOutOfRangeException.cs
- CellQuery.cs
- EditorPartChrome.cs
- DBPropSet.cs
- ToolBarPanel.cs
- DrawToolTipEventArgs.cs
- XmlAutoDetectWriter.cs
- GeometryGroup.cs
- Utilities.cs