Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / wpf / src / Framework / System / Windows / Markup / TemplateComponentConnector.cs / 1 / TemplateComponentConnector.cs
/****************************************************************************\ * * File: OptimizedTemplateComponentConnector.cs * * Purpose: Provides an IComponentConnector which is used in instantiation * of optimized template content. * * Copyright (C) 2005 by Microsoft Corporation. All rights reserved. * \***************************************************************************/ using System; using System.Xml; using System.IO; using System.Windows; using System.Windows.Media; using System.Windows.Navigation; using System.Text; using System.Collections; using System.Collections.Generic; using System.ComponentModel; using System.Windows.Controls; using System.Windows.Documents; using System.Windows.Media.Animation; using System.Diagnostics; using System.Reflection; using System.Windows.Threading; using System.Windows.Data; using System.Globalization; using MS.Utility; namespace System.Windows.Markup { // This class provides an IComponentConnector implementation for use during instantiation // of optimized template content. It is given an IComponentConnector, and most calls are // just forwarded to it. But it is also given an IStyleConnector, and calls to Connect // are sent there instead. internal class TemplateComponentConnector : IComponentConnector { internal TemplateComponentConnector( IComponentConnector componentConnector, IStyleConnector styleConnector ) { _styleConnector = styleConnector; _componentConnector = componentConnector; } public void InitializeComponent() { _componentConnector.InitializeComponent(); } public void Connect(int connectionId, object target) { // Calls to IComponentConnector.Connect from template content get forwarded // to the outer style connector (when we have one). if (_styleConnector != null) { _styleConnector.Connect(connectionId, target); } else { _componentConnector.Connect(connectionId, target); } } private IStyleConnector _styleConnector; private IComponentConnector _componentConnector; } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. /****************************************************************************\ * * File: OptimizedTemplateComponentConnector.cs * * Purpose: Provides an IComponentConnector which is used in instantiation * of optimized template content. * * Copyright (C) 2005 by Microsoft Corporation. All rights reserved. * \***************************************************************************/ using System; using System.Xml; using System.IO; using System.Windows; using System.Windows.Media; using System.Windows.Navigation; using System.Text; using System.Collections; using System.Collections.Generic; using System.ComponentModel; using System.Windows.Controls; using System.Windows.Documents; using System.Windows.Media.Animation; using System.Diagnostics; using System.Reflection; using System.Windows.Threading; using System.Windows.Data; using System.Globalization; using MS.Utility; namespace System.Windows.Markup { // This class provides an IComponentConnector implementation for use during instantiation // of optimized template content. It is given an IComponentConnector, and most calls are // just forwarded to it. But it is also given an IStyleConnector, and calls to Connect // are sent there instead. internal class TemplateComponentConnector : IComponentConnector { internal TemplateComponentConnector( IComponentConnector componentConnector, IStyleConnector styleConnector ) { _styleConnector = styleConnector; _componentConnector = componentConnector; } public void InitializeComponent() { _componentConnector.InitializeComponent(); } public void Connect(int connectionId, object target) { // Calls to IComponentConnector.Connect from template content get forwarded // to the outer style connector (when we have one). if (_styleConnector != null) { _styleConnector.Connect(connectionId, target); } else { _componentConnector.Connect(connectionId, target); } } private IStyleConnector _styleConnector; private IComponentConnector _componentConnector; } } // 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
- CursorInteropHelper.cs
- OutputBuffer.cs
- LassoSelectionBehavior.cs
- TimeoutValidationAttribute.cs
- HyperLink.cs
- SynthesizerStateChangedEventArgs.cs
- SqlMethodAttribute.cs
- TraceContextEventArgs.cs
- InkSerializer.cs
- FileUtil.cs
- SamlAuthenticationStatement.cs
- SiteMapPath.cs
- DbMetaDataFactory.cs
- BuildDependencySet.cs
- ASCIIEncoding.cs
- RequestChannel.cs
- HotSpotCollection.cs
- MetadataSerializer.cs
- ClassHandlersStore.cs
- ServiceDescriptionReflector.cs
- ContractsBCL.cs
- DataGridViewMethods.cs
- CookielessHelper.cs
- SafeEventLogWriteHandle.cs
- AppSettingsReader.cs
- ExpressionVisitor.cs
- VectorConverter.cs
- NoneExcludedImageIndexConverter.cs
- LowerCaseStringConverter.cs
- DesignerTransaction.cs
- HealthMonitoringSection.cs
- SR.Designer.cs
- TextBounds.cs
- CodeMemberField.cs
- Graphics.cs
- UInt32.cs
- PenCursorManager.cs
- ParseNumbers.cs
- ObjectHandle.cs
- AuthorizationSection.cs
- RevocationPoint.cs
- TextReader.cs
- CompilerLocalReference.cs
- Color.cs
- QilTernary.cs
- XPathSelectionIterator.cs
- LinqDataSourceDisposeEventArgs.cs
- FlagsAttribute.cs
- ParserExtension.cs
- IsolatedStorageFileStream.cs
- WebRequestModulesSection.cs
- WebExceptionStatus.cs
- Throw.cs
- ClientSettingsStore.cs
- _HelperAsyncResults.cs
- DataSourceControl.cs
- SafePEFileHandle.cs
- XmlSchemaDatatype.cs
- DashStyles.cs
- TextBoxLine.cs
- PropertyAccessVisitor.cs
- VisualStyleElement.cs
- ServiceThrottlingBehavior.cs
- CellLabel.cs
- ListViewTableCell.cs
- DesignBinding.cs
- OutputWindow.cs
- ResourcesChangeInfo.cs
- ColorMatrix.cs
- WebPartUtil.cs
- RectAnimation.cs
- GroupBoxRenderer.cs
- LinqDataSource.cs
- RevocationPoint.cs
- SQLConvert.cs
- TargetParameterCountException.cs
- SQLString.cs
- ListBoxItem.cs
- WebBrowserHelper.cs
- DataObject.cs
- MdiWindowListItemConverter.cs
- SrgsGrammarCompiler.cs
- PrimitiveXmlSerializers.cs
- ImageAnimator.cs
- Base64Stream.cs
- HierarchicalDataBoundControlAdapter.cs
- RequestSecurityTokenForRemoteTokenFactory.cs
- EncodingTable.cs
- Crc32.cs
- DataRecordInternal.cs
- HashRepartitionStream.cs
- TraceXPathNavigator.cs
- XmlBuffer.cs
- AmbiguousMatchException.cs
- CalculatedColumn.cs
- Size3D.cs
- ImageAutomationPeer.cs
- CompilerInfo.cs
- SmtpNtlmAuthenticationModule.cs
- DataListItemEventArgs.cs