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
- StylusTip.cs
- EmptyCollection.cs
- ReferentialConstraint.cs
- DeviceContext2.cs
- BitSet.cs
- TextElementCollection.cs
- TextParagraphView.cs
- ApplicationContext.cs
- BamlVersionHeader.cs
- ProjectionPathSegment.cs
- Matrix3DStack.cs
- WrapPanel.cs
- CustomError.cs
- TextSelection.cs
- BypassElementCollection.cs
- NavigationEventArgs.cs
- RoutedEventValueSerializer.cs
- WebPartEditorCancelVerb.cs
- ServiceHostFactory.cs
- ObjRef.cs
- Variant.cs
- FigureParagraph.cs
- RawStylusActions.cs
- WorkflowQueuingService.cs
- XmlWrappingWriter.cs
- SchemaCompiler.cs
- SettingsPropertyWrongTypeException.cs
- VSWCFServiceContractGenerator.cs
- ModifiableIteratorCollection.cs
- ReadWriteControlDesigner.cs
- Variable.cs
- DisplayNameAttribute.cs
- WebPartZoneBase.cs
- RecipientInfo.cs
- QueryStringParameter.cs
- precedingsibling.cs
- SchemaObjectWriter.cs
- CompareValidator.cs
- ParseChildrenAsPropertiesAttribute.cs
- SkipStoryboardToFill.cs
- StateBag.cs
- FixedSOMTable.cs
- JavaScriptString.cs
- ProfileBuildProvider.cs
- EventHandlersStore.cs
- DependencyPropertyValueSerializer.cs
- OleStrCAMarshaler.cs
- CodeTypeReferenceSerializer.cs
- CqlLexer.cs
- DataTablePropertyDescriptor.cs
- StatusBar.cs
- StickyNoteHelper.cs
- GlyphTypeface.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- XmlSchemaAppInfo.cs
- RenderDataDrawingContext.cs
- CategoryGridEntry.cs
- DataRecordInternal.cs
- PageCodeDomTreeGenerator.cs
- SourceFileBuildProvider.cs
- Parser.cs
- ElementUtil.cs
- FontSource.cs
- TrimSurroundingWhitespaceAttribute.cs
- StyleModeStack.cs
- SqlDataSourceView.cs
- SerializationAttributes.cs
- ConfigurationSchemaErrors.cs
- SecurityCriticalDataForSet.cs
- HeaderUtility.cs
- Zone.cs
- KeyValuePair.cs
- LifetimeMonitor.cs
- remotingproxy.cs
- StopStoryboard.cs
- Util.cs
- SecurityTokenSerializer.cs
- ContentTextAutomationPeer.cs
- SerializationHelper.cs
- PassportPrincipal.cs
- HijriCalendar.cs
- ElementMarkupObject.cs
- ActivityExecutorSurrogate.cs
- ImportException.cs
- DrawingGroup.cs
- HMACMD5.cs
- IPCCacheManager.cs
- diagnosticsswitches.cs
- WebPartManager.cs
- SatelliteContractVersionAttribute.cs
- BaseServiceProvider.cs
- XslCompiledTransform.cs
- ScopelessEnumAttribute.cs
- TrackBar.cs
- XmlSchemaSet.cs
- Selector.cs
- ContentHostHelper.cs
- CounterCreationData.cs
- x509utils.cs
- CustomAttribute.cs