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
- SetStateEventArgs.cs
- DispatcherObject.cs
- StylusDevice.cs
- CodeTypeDeclarationCollection.cs
- OrderedDictionaryStateHelper.cs
- MarginCollapsingState.cs
- PopupRoot.cs
- ObjectSecurity.cs
- TabControl.cs
- RegistrySecurity.cs
- DeclarativeCatalogPart.cs
- SqlDependency.cs
- ValidationSummary.cs
- ChannelServices.cs
- PresentationSource.cs
- ObjectViewFactory.cs
- SharedPerformanceCounter.cs
- HttpCapabilitiesSectionHandler.cs
- FileDialogCustomPlace.cs
- DigitShape.cs
- TrackingProfileDeserializationException.cs
- dbdatarecord.cs
- SessionPageStateSection.cs
- ReliableSessionBindingElement.cs
- MergablePropertyAttribute.cs
- NumberFormatter.cs
- MembershipUser.cs
- IxmlLineInfo.cs
- XmlWrappingWriter.cs
- ByteAnimationUsingKeyFrames.cs
- MetadataUtilsSmi.cs
- NameTable.cs
- Int32Rect.cs
- EndpointIdentityConverter.cs
- DataSourceCache.cs
- ToolStripArrowRenderEventArgs.cs
- NamedPermissionSet.cs
- DataGridView.cs
- ClientBuildManager.cs
- TrackingProfileCache.cs
- SoapExtensionTypeElementCollection.cs
- EventDescriptorCollection.cs
- TriState.cs
- LinkUtilities.cs
- StylusDevice.cs
- XmlBoundElement.cs
- ProtectedConfigurationSection.cs
- IncrementalHitTester.cs
- CfgParser.cs
- TdsParserStateObject.cs
- RangeValuePattern.cs
- Win32MouseDevice.cs
- CornerRadius.cs
- RNGCryptoServiceProvider.cs
- OdbcErrorCollection.cs
- EditorPartChrome.cs
- MediaContext.cs
- HierarchicalDataBoundControl.cs
- BaseParaClient.cs
- OneOf.cs
- SamlAdvice.cs
- ChangePasswordDesigner.cs
- DateTimeFormatInfo.cs
- ComponentEvent.cs
- XmlMembersMapping.cs
- SvcMapFileLoader.cs
- XmlSchemaFacet.cs
- StackSpiller.cs
- DesignerRegion.cs
- MediaTimeline.cs
- Button.cs
- CalendarButton.cs
- CheckableControlBaseAdapter.cs
- TemplateBindingExtensionConverter.cs
- EventHandlers.cs
- DataSpaceManager.cs
- InvalidStoreProtectionKeyException.cs
- Line.cs
- MulticastOption.cs
- DataSourceCacheDurationConverter.cs
- EnterpriseServicesHelper.cs
- DragCompletedEventArgs.cs
- MobileUserControlDesigner.cs
- Point3DKeyFrameCollection.cs
- HandlerBase.cs
- FormsAuthenticationConfiguration.cs
- ScriptReferenceBase.cs
- DataGridViewCellErrorTextNeededEventArgs.cs
- Validator.cs
- HttpHandlerAction.cs
- LineServices.cs
- ResourceFallbackManager.cs
- CodeGenerationManager.cs
- PageWrapper.cs
- DelegatingStream.cs
- PlanCompilerUtil.cs
- WorkflowApplicationUnloadedException.cs
- ViewSimplifier.cs
- PropertyConverter.cs
- ProtectedProviderSettings.cs