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
- AggregationMinMaxHelpers.cs
- Single.cs
- EntityDescriptor.cs
- StrongName.cs
- SendMailErrorEventArgs.cs
- AppSettingsExpressionBuilder.cs
- DesignTimeParseData.cs
- HiddenFieldDesigner.cs
- OdbcRowUpdatingEvent.cs
- ExtendedPropertyInfo.cs
- Axis.cs
- BuildProviderUtils.cs
- MultipleViewPattern.cs
- BaseValidator.cs
- ToolStripItemImageRenderEventArgs.cs
- ValueCollectionParameterReader.cs
- TraceSource.cs
- XmlChildEnumerator.cs
- SmtpNetworkElement.cs
- ItemCollection.cs
- MessageQueueAccessControlEntry.cs
- ErrorReporting.cs
- ScriptingAuthenticationServiceSection.cs
- CardSpaceSelector.cs
- SmiEventSink_DeferedProcessing.cs
- PageSettings.cs
- QilVisitor.cs
- WebPartConnectionsCancelEventArgs.cs
- MailAddressParser.cs
- CapabilitiesState.cs
- DataControlFieldTypeEditor.cs
- FixedPage.cs
- ScriptReferenceBase.cs
- pingexception.cs
- _SslSessionsCache.cs
- SqlConnectionHelper.cs
- SqlGenerator.cs
- TextRunCache.cs
- ACE.cs
- SizeValueSerializer.cs
- BindMarkupExtensionSerializer.cs
- indexingfiltermarshaler.cs
- ChangeNode.cs
- WorkflowMarkupSerializationProvider.cs
- SecurityTokenContainer.cs
- WindowsToolbarItemAsMenuItem.cs
- SqlUnionizer.cs
- ErrorView.xaml.cs
- ListControlActionList.cs
- DetailsViewCommandEventArgs.cs
- _DisconnectOverlappedAsyncResult.cs
- TargetControlTypeAttribute.cs
- EventMemberCodeDomSerializer.cs
- StateInitializationDesigner.cs
- CqlWriter.cs
- HostedImpersonationContext.cs
- ThousandthOfEmRealPoints.cs
- SafeBuffer.cs
- XmlNamedNodeMap.cs
- OleDbConnectionFactory.cs
- SqlDataSourceCache.cs
- ThemeableAttribute.cs
- DataGridViewCellCollection.cs
- ProviderSettings.cs
- OdbcRowUpdatingEvent.cs
- BaseUriHelper.cs
- LocationUpdates.cs
- Compiler.cs
- CssTextWriter.cs
- DrawingCollection.cs
- SubMenuStyleCollectionEditor.cs
- FullTextState.cs
- ReadOnlyMetadataCollection.cs
- CodeTypeMemberCollection.cs
- ReadWriteObjectLock.cs
- SrgsDocument.cs
- SqlConnectionFactory.cs
- HtmlContainerControl.cs
- DelegatingMessage.cs
- UnsafeNativeMethods.cs
- MemberAccessException.cs
- PlatformNotSupportedException.cs
- UInt64Storage.cs
- StorageEntityTypeMapping.cs
- ResolveNameEventArgs.cs
- InternalRelationshipCollection.cs
- FSWPathEditor.cs
- QuaternionKeyFrameCollection.cs
- FileAuthorizationModule.cs
- MenuItem.cs
- ProtocolsConfigurationEntry.cs
- PeerNameRecord.cs
- JsonStringDataContract.cs
- FieldNameLookup.cs
- Int64.cs
- DateTimePicker.cs
- Nullable.cs
- StringHelper.cs
- FormViewDesigner.cs
- ResourcePart.cs