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
- MimeMultiPart.cs
- OdbcConnectionString.cs
- KeyPressEvent.cs
- XhtmlBasicImageAdapter.cs
- SchemaNamespaceManager.cs
- HostProtectionException.cs
- ContextInformation.cs
- BaseCollection.cs
- BaseTransportHeaders.cs
- EventLevel.cs
- ArcSegment.cs
- AutomationPatternInfo.cs
- ListViewItemSelectionChangedEvent.cs
- OleDbDataReader.cs
- TextDocumentView.cs
- BitmapEffectCollection.cs
- LayoutEvent.cs
- PostBackOptions.cs
- DocumentPageView.cs
- BindingWorker.cs
- TableRowCollection.cs
- DataGridViewRowPostPaintEventArgs.cs
- SqlExpander.cs
- XsltFunctions.cs
- ApplicationActivator.cs
- BitArray.cs
- SingleObjectCollection.cs
- AutoGeneratedField.cs
- FlowDocumentPage.cs
- DataGridViewAutoSizeModeEventArgs.cs
- ClaimSet.cs
- SecurityContextSecurityTokenResolver.cs
- HandlerMappingMemo.cs
- EastAsianLunisolarCalendar.cs
- NotifyCollectionChangedEventArgs.cs
- EditorServiceContext.cs
- Guid.cs
- LineProperties.cs
- ConsoleCancelEventArgs.cs
- LockCookie.cs
- DispatchWrapper.cs
- FixedSOMGroup.cs
- PageTheme.cs
- XmlValidatingReaderImpl.cs
- TerminateDesigner.cs
- RootBuilder.cs
- CellCreator.cs
- AppSettingsExpressionBuilder.cs
- COSERVERINFO.cs
- WmpBitmapEncoder.cs
- TimelineGroup.cs
- MexHttpBindingCollectionElement.cs
- IndexingContentUnit.cs
- PageStatePersister.cs
- cookieexception.cs
- MouseGestureValueSerializer.cs
- RangeBaseAutomationPeer.cs
- NativeMethods.cs
- DrawingDrawingContext.cs
- CustomErrorsSectionWrapper.cs
- AssemblySettingAttributes.cs
- ObjectDataSourceMethodEventArgs.cs
- __Filters.cs
- EntityWithChangeTrackerStrategy.cs
- SamlAttributeStatement.cs
- HostingEnvironmentSection.cs
- ToolZone.cs
- EntityDataSourceStatementEditor.cs
- DataGridItemAttachedStorage.cs
- SrgsSubset.cs
- DomainConstraint.cs
- EdmToObjectNamespaceMap.cs
- CommentEmitter.cs
- ThrowHelper.cs
- LogArchiveSnapshot.cs
- CodeLinePragma.cs
- autovalidator.cs
- ValidationHelper.cs
- MSAAWinEventWrap.cs
- BasicAsyncResult.cs
- RootContext.cs
- ApplicationServiceHelper.cs
- EndpointDispatcher.cs
- SendAgentStatusRequest.cs
- XmlAttributeCollection.cs
- DataContractFormatAttribute.cs
- TextTrailingWordEllipsis.cs
- OptionalColumn.cs
- AnimatedTypeHelpers.cs
- DoubleAnimationBase.cs
- TypeElement.cs
- Symbol.cs
- ElementHostPropertyMap.cs
- XmlDataProvider.cs
- SaveFileDialog.cs
- ErrorStyle.cs
- CellParagraph.cs
- UidPropertyAttribute.cs
- ObjectComplexPropertyMapping.cs
- HtmlHistory.cs