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 / 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
- DeviceOverridableAttribute.cs
- UInt64.cs
- PenContexts.cs
- PathFigureCollection.cs
- StringWriter.cs
- AssociatedControlConverter.cs
- SqlClientPermission.cs
- MultiByteCodec.cs
- FacetChecker.cs
- IncrementalReadDecoders.cs
- WebServiceErrorEvent.cs
- Int32AnimationUsingKeyFrames.cs
- StoragePropertyMapping.cs
- MemberAssignment.cs
- StrongNameSignatureInformation.cs
- HiddenField.cs
- ParameterCollectionEditor.cs
- dbdatarecord.cs
- NativeWindow.cs
- Dynamic.cs
- XamlRtfConverter.cs
- InputManager.cs
- TraceContextRecord.cs
- WebServiceData.cs
- CatalogPartCollection.cs
- FilterRepeater.cs
- RTLAwareMessageBox.cs
- BamlRecordWriter.cs
- WebEventTraceProvider.cs
- InvalidPropValue.cs
- PanelDesigner.cs
- XPathException.cs
- CodeAttributeDeclarationCollection.cs
- KeyProperty.cs
- StringComparer.cs
- CodeArgumentReferenceExpression.cs
- DataProtection.cs
- SafeSystemMetrics.cs
- InstanceCreationEditor.cs
- DataObjectAttribute.cs
- DataGridSortingEventArgs.cs
- MeshGeometry3D.cs
- WebPartChrome.cs
- Sql8ConformanceChecker.cs
- WCFModelStrings.Designer.cs
- HtmlControlPersistable.cs
- DataGridViewRowStateChangedEventArgs.cs
- FixedDocument.cs
- DiscoveryClientOutputChannel.cs
- XsltContext.cs
- HashStream.cs
- DynamicActionMessageFilter.cs
- ImageField.cs
- BitmapCodecInfoInternal.cs
- SourceLineInfo.cs
- SqlDataSourceCommandEventArgs.cs
- XmlAttributes.cs
- BasicHttpMessageCredentialType.cs
- OracleDataAdapter.cs
- TableItemProviderWrapper.cs
- Base64Encoder.cs
- Activation.cs
- RemotingClientProxy.cs
- IdnMapping.cs
- EncryptedXml.cs
- RelatedView.cs
- CodeValidator.cs
- BufferedReadStream.cs
- ServiceHostFactory.cs
- TextPointer.cs
- SystemIPGlobalStatistics.cs
- SqlVisitor.cs
- NavigationService.cs
- CharKeyFrameCollection.cs
- MultipartContentParser.cs
- BamlBinaryReader.cs
- TypedDatasetGenerator.cs
- DoubleAnimationUsingPath.cs
- TypeNameParser.cs
- ComboBox.cs
- ZipIOZip64EndOfCentralDirectoryBlock.cs
- WsiProfilesElement.cs
- SqlXml.cs
- Rfc2898DeriveBytes.cs
- NestedContainer.cs
- Pointer.cs
- DbExpressionBuilder.cs
- System.Data.OracleClient_BID.cs
- HyperlinkAutomationPeer.cs
- TypeInitializationException.cs
- AppDomainUnloadedException.cs
- SafeViewOfFileHandle.cs
- AxParameterData.cs
- SqlTrackingWorkflowInstance.cs
- DataBindingHandlerAttribute.cs
- HotSpot.cs
- _HTTPDateParse.cs
- CssTextWriter.cs
- CodeTypeReference.cs
- HtmlTableRowCollection.cs