Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- X509SecurityToken.cs
- DesignerObject.cs
- MiniConstructorInfo.cs
- ManagedWndProcTracker.cs
- FrameworkElement.cs
- ProfileServiceManager.cs
- XmlSchemaFacet.cs
- NavigationWindowAutomationPeer.cs
- Win32Exception.cs
- ListView.cs
- RelatedImageListAttribute.cs
- RemoteWebConfigurationHostServer.cs
- TabControl.cs
- BitmapEffectDrawing.cs
- RepeaterItemEventArgs.cs
- processwaithandle.cs
- GradientBrush.cs
- StringWriter.cs
- ItemAutomationPeer.cs
- SecureUICommand.cs
- PageCatalogPart.cs
- FillErrorEventArgs.cs
- DataSet.cs
- RSACryptoServiceProvider.cs
- TransactionManagerProxy.cs
- TreeViewImageIndexConverter.cs
- HttpBrowserCapabilitiesWrapper.cs
- ExceptionUtility.cs
- Line.cs
- PeerTransportSecurityElement.cs
- FunctionDefinition.cs
- InvalidateEvent.cs
- SqlUtil.cs
- DebuggerService.cs
- ListItemCollection.cs
- ExtensionQuery.cs
- DataControlFieldHeaderCell.cs
- FakeModelItemImpl.cs
- FontCacheUtil.cs
- RemotingClientProxy.cs
- PeerContact.cs
- ComponentResourceManager.cs
- ContractsBCL.cs
- ByteKeyFrameCollection.cs
- SqlAggregateChecker.cs
- MarkupProperty.cs
- ISAPIRuntime.cs
- NativeMethods.cs
- CodeAttributeDeclarationCollection.cs
- HitTestWithPointDrawingContextWalker.cs
- WebBaseEventKeyComparer.cs
- AssociationSetEnd.cs
- RegexCapture.cs
- ScriptComponentDescriptor.cs
- UnsafeNativeMethodsMilCoreApi.cs
- EntitySetBase.cs
- ADMembershipProvider.cs
- grammarelement.cs
- ServiceProviders.cs
- PathTooLongException.cs
- JsonEncodingStreamWrapper.cs
- Pen.cs
- PropertyGrid.cs
- WindowsSlider.cs
- PasswordRecovery.cs
- WebChannelFactory.cs
- DragDropHelper.cs
- SourceFilter.cs
- TextSpan.cs
- GB18030Encoding.cs
- EntitySqlException.cs
- XmlChoiceIdentifierAttribute.cs
- SpotLight.cs
- AsyncStreamReader.cs
- SynchronizationContext.cs
- DataSetUtil.cs
- AnimationTimeline.cs
- FragmentNavigationEventArgs.cs
- Error.cs
- SystemWebExtensionsSectionGroup.cs
- ImagingCache.cs
- SyndicationItemFormatter.cs
- HashCodeCombiner.cs
- FrameDimension.cs
- CSharpCodeProvider.cs
- BitmapFrameDecode.cs
- ViewCellRelation.cs
- SwitchCase.cs
- FormClosingEvent.cs
- Ray3DHitTestResult.cs
- NameSpaceEvent.cs
- Calendar.cs
- BaseAsyncResult.cs
- HttpListenerRequest.cs
- TcpSocketManager.cs
- Pair.cs
- CodeTypeReferenceCollection.cs
- DataGridTable.cs
- FilterableAttribute.cs
- BatchWriter.cs