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
- FileAuthorizationModule.cs
- XmlLinkedNode.cs
- HandlerBase.cs
- Automation.cs
- FixedSOMFixedBlock.cs
- MouseEvent.cs
- _SafeNetHandles.cs
- TabItemWrapperAutomationPeer.cs
- AxHost.cs
- ServiceContractViewControl.cs
- SmtpClient.cs
- TransformerConfigurationWizardBase.cs
- AuthenticationConfig.cs
- TypePropertyEditor.cs
- AddingNewEventArgs.cs
- TableDetailsRow.cs
- CollectionChangeEventArgs.cs
- TreeView.cs
- SoapServerProtocol.cs
- PropertyTabChangedEvent.cs
- ScrollChrome.cs
- ProfileSettings.cs
- TransactionBridgeSection.cs
- MatrixUtil.cs
- DbProviderFactories.cs
- DataListItem.cs
- SiteMapNodeItemEventArgs.cs
- JavaScriptSerializer.cs
- GridViewCancelEditEventArgs.cs
- IgnoreDataMemberAttribute.cs
- EmptyImpersonationContext.cs
- Code.cs
- TrustLevel.cs
- UmAlQuraCalendar.cs
- SpinLock.cs
- SqlErrorCollection.cs
- EntityDataSourceDesigner.cs
- ArraySubsetEnumerator.cs
- MatrixTransform.cs
- TextRenderer.cs
- SerialStream.cs
- ProtectedConfigurationProviderCollection.cs
- Variable.cs
- CalendarDesigner.cs
- CookielessHelper.cs
- ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs
- XmlSchema.cs
- ServiceParser.cs
- MethodInfo.cs
- CodeDirectoryCompiler.cs
- MSG.cs
- CompilerErrorCollection.cs
- OdbcHandle.cs
- COAUTHINFO.cs
- TaskDesigner.cs
- StrokeCollection2.cs
- Utils.cs
- HTMLTagNameToTypeMapper.cs
- MediaPlayer.cs
- EditorPart.cs
- XmlDeclaration.cs
- SqlUserDefinedTypeAttribute.cs
- HierarchicalDataTemplate.cs
- GlyphElement.cs
- ToolStripHighContrastRenderer.cs
- ListMarkerLine.cs
- SymbolPair.cs
- connectionpool.cs
- ValidatorCollection.cs
- JapaneseLunisolarCalendar.cs
- OleDbConnectionInternal.cs
- ComboBoxAutomationPeer.cs
- EventKeyword.cs
- CreateUserErrorEventArgs.cs
- ImportException.cs
- ServiceDescriptionImporter.cs
- ISAPIApplicationHost.cs
- HtmlInputButton.cs
- DbDataAdapter.cs
- SortedSet.cs
- RectValueSerializer.cs
- SecUtil.cs
- StrokeCollectionConverter.cs
- MetadataItemEmitter.cs
- WebBaseEventKeyComparer.cs
- WebControl.cs
- EntityDescriptor.cs
- UriTemplateHelpers.cs
- RightsManagementEncryptedStream.cs
- DataGridViewHeaderCell.cs
- Graphics.cs
- TraceSwitch.cs
- FrameworkElement.cs
- ErrorTableItemStyle.cs
- DayRenderEvent.cs
- PolicyImporterElementCollection.cs
- HtmlTable.cs
- DesignerFrame.cs
- PrivilegedConfigurationManager.cs
- FunctionQuery.cs