Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- CheckBoxAutomationPeer.cs
- TextProviderWrapper.cs
- XmlnsCompatibleWithAttribute.cs
- Permission.cs
- InstanceLockedException.cs
- PropertyGeneratedEventArgs.cs
- PerformanceCounterLib.cs
- CellCreator.cs
- WebPartConnectVerb.cs
- EntityContainerEntitySet.cs
- SafeCryptoHandles.cs
- StylusPlugInCollection.cs
- GenericsInstances.cs
- ControlParser.cs
- RSAProtectedConfigurationProvider.cs
- LayoutEditorPart.cs
- SystemDiagnosticsSection.cs
- StorageMappingFragment.cs
- BinHexEncoding.cs
- StringCollection.cs
- RewritingPass.cs
- XmlTextReader.cs
- TraceData.cs
- connectionpool.cs
- TableStyle.cs
- StructuredProperty.cs
- HandledMouseEvent.cs
- UriWriter.cs
- DispatcherFrame.cs
- DSACryptoServiceProvider.cs
- XsdDateTime.cs
- embossbitmapeffect.cs
- ClientEventManager.cs
- TreeNodeStyleCollectionEditor.cs
- RegisteredDisposeScript.cs
- XmlSchemaException.cs
- VerticalAlignConverter.cs
- StringPropertyBuilder.cs
- TraceSection.cs
- CodeMemberField.cs
- EmptyEnumerator.cs
- ImageButton.cs
- CheckBoxStandardAdapter.cs
- CopyOnWriteList.cs
- ConnectionStringsSection.cs
- ContentPlaceHolder.cs
- IApplicationTrustManager.cs
- PageContentAsyncResult.cs
- HostDesigntimeLicenseContext.cs
- DataGridViewRowCollection.cs
- URLAttribute.cs
- ListViewUpdatedEventArgs.cs
- NavigationService.cs
- MouseEvent.cs
- RSAOAEPKeyExchangeFormatter.cs
- AdRotatorDesigner.cs
- RequestBringIntoViewEventArgs.cs
- ScrollBar.cs
- Propagator.JoinPropagator.cs
- VBCodeProvider.cs
- coordinator.cs
- ComPlusAuthorization.cs
- RtfNavigator.cs
- Size3DConverter.cs
- BooleanFunctions.cs
- TabControl.cs
- PresentationAppDomainManager.cs
- GridLengthConverter.cs
- RTLAwareMessageBox.cs
- CodeGen.cs
- SymbolEqualComparer.cs
- SqlNotificationEventArgs.cs
- BuildTopDownAttribute.cs
- IsolatedStorage.cs
- OdbcCommandBuilder.cs
- DelegateSerializationHolder.cs
- LogManagementAsyncResult.cs
- MatrixIndependentAnimationStorage.cs
- StateElementCollection.cs
- OleStrCAMarshaler.cs
- ConnectionManagementSection.cs
- RelativeSource.cs
- AudioStateChangedEventArgs.cs
- HuffCodec.cs
- CellRelation.cs
- WebRequestModuleElementCollection.cs
- Perspective.cs
- RichListBox.cs
- MD5.cs
- MsmqIntegrationAppDomainProtocolHandler.cs
- DirectionalLight.cs
- IntegerValidatorAttribute.cs
- Stroke.cs
- handlecollector.cs
- ParameterCollection.cs
- WindowProviderWrapper.cs
- Timeline.cs
- TypeInfo.cs
- EnumUnknown.cs
- BitmapEffectDrawing.cs