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
- DetailsViewActionList.cs
- AssemblyBuilder.cs
- CacheManager.cs
- MessageDesigner.cs
- XmlLinkedNode.cs
- DataGridViewCellValidatingEventArgs.cs
- FloatUtil.cs
- BaseCollection.cs
- FacetDescriptionElement.cs
- MailAddress.cs
- StreamGeometryContext.cs
- ConfigXmlWhitespace.cs
- WebPartsPersonalizationAuthorization.cs
- PassportPrincipal.cs
- x509utils.cs
- OuterGlowBitmapEffect.cs
- XmlSchemaSimpleTypeList.cs
- loginstatus.cs
- Root.cs
- CopyOfAction.cs
- FixedSOMTable.cs
- ProcessHost.cs
- Oid.cs
- Int16.cs
- DataGridViewHitTestInfo.cs
- panel.cs
- LockedHandleGlyph.cs
- ProcessDesigner.cs
- SecureEnvironment.cs
- HttpResponseHeader.cs
- DeploymentExceptionMapper.cs
- Int32Rect.cs
- OutputScope.cs
- GlyphTypeface.cs
- DtcInterfaces.cs
- ConstraintEnumerator.cs
- NameValueSectionHandler.cs
- Config.cs
- BitmapCodecInfo.cs
- GridViewColumnHeaderAutomationPeer.cs
- StringReader.cs
- Style.cs
- ExpandCollapsePattern.cs
- FontDialog.cs
- XmlNodeComparer.cs
- UnsafeNativeMethodsPenimc.cs
- Interlocked.cs
- SQLChars.cs
- SafeFileMapViewHandle.cs
- GridProviderWrapper.cs
- Dictionary.cs
- InputEventArgs.cs
- GlyphRunDrawing.cs
- EncryptedType.cs
- ConfigViewGenerator.cs
- DataGridViewCellEventArgs.cs
- PeerTransportElement.cs
- LineMetrics.cs
- XmlILOptimizerVisitor.cs
- Expression.cs
- AuthenticationServiceManager.cs
- _SSPISessionCache.cs
- DrawingContextDrawingContextWalker.cs
- UpdatePanelTrigger.cs
- HtmlDocument.cs
- KnownTypesHelper.cs
- PointAnimationUsingPath.cs
- DataGridViewIntLinkedList.cs
- XmlHelper.cs
- CanExecuteRoutedEventArgs.cs
- ValueTypeFixupInfo.cs
- TextBoxLine.cs
- FontNamesConverter.cs
- XsltSettings.cs
- XmlSchemaAttributeGroup.cs
- ToolStripContentPanelRenderEventArgs.cs
- DataServiceQuery.cs
- EllipseGeometry.cs
- Size3D.cs
- Membership.cs
- StringUtil.cs
- Baml6ConstructorInfo.cs
- Range.cs
- ObsoleteAttribute.cs
- DelegateBodyWriter.cs
- NavigationService.cs
- XmlProcessingInstruction.cs
- HMAC.cs
- DockAndAnchorLayout.cs
- DataSourceControlBuilder.cs
- Console.cs
- ActiveXSite.cs
- BCryptNative.cs
- FilteredReadOnlyMetadataCollection.cs
- HtmlHistory.cs
- SamlAdvice.cs
- LineVisual.cs
- TypeSystemProvider.cs
- SourceChangedEventArgs.cs
- WeakHashtable.cs