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
- SizeFConverter.cs
- TitleStyle.cs
- SmtpException.cs
- ConstructorNeedsTagAttribute.cs
- HttpServerUtilityBase.cs
- XPathNodeList.cs
- ParallelTimeline.cs
- StringBuilder.cs
- Metafile.cs
- SqlCommand.cs
- MemoryStream.cs
- ToolStripItemRenderEventArgs.cs
- DataBoundControlHelper.cs
- WebMessageEncodingElement.cs
- DESCryptoServiceProvider.cs
- SpotLight.cs
- XmlCharCheckingReader.cs
- ImplicitInputBrush.cs
- AccessDataSourceDesigner.cs
- OracleParameterCollection.cs
- TextDecoration.cs
- OperatorExpressions.cs
- GB18030Encoding.cs
- SqlNode.cs
- UnsafeNativeMethods.cs
- SqlConnectionPoolProviderInfo.cs
- DockingAttribute.cs
- SymbolType.cs
- XPathSelectionIterator.cs
- DocumentPaginator.cs
- AppDomainAttributes.cs
- PropertyOrder.cs
- StreamInfo.cs
- CodeTypeParameterCollection.cs
- UnsafeNativeMethods.cs
- PointIndependentAnimationStorage.cs
- NativeMethods.cs
- InvokeHandlers.cs
- PackageRelationshipCollection.cs
- VisualTreeHelper.cs
- DtrList.cs
- WebErrorHandler.cs
- XmlProcessingInstruction.cs
- LinqToSqlWrapper.cs
- UInt32.cs
- SerializationSectionGroup.cs
- ClientSideProviderDescription.cs
- ScriptReferenceBase.cs
- FixedHighlight.cs
- Matrix3DConverter.cs
- CodeRegionDirective.cs
- ToolStripOverflowButton.cs
- InheritanceUI.cs
- QuaternionIndependentAnimationStorage.cs
- Window.cs
- Flattener.cs
- ClientSideQueueItem.cs
- WsdlInspector.cs
- EntityKey.cs
- RemoteWebConfigurationHostStream.cs
- SchemaDeclBase.cs
- DataMemberConverter.cs
- UInt32Storage.cs
- CreateDataSourceDialog.cs
- LinearQuaternionKeyFrame.cs
- RoutedCommand.cs
- FileClassifier.cs
- PersistenceIOParticipant.cs
- PagePropertiesChangingEventArgs.cs
- SystemUnicastIPAddressInformation.cs
- Axis.cs
- NameTable.cs
- MultipleCopiesCollection.cs
- EncodingNLS.cs
- Helpers.cs
- Transform3D.cs
- InkCanvasInnerCanvas.cs
- InvokeHandlers.cs
- SoapCommonClasses.cs
- HMAC.cs
- WebGetAttribute.cs
- XmlSequenceWriter.cs
- WindowsListViewItemStartMenu.cs
- CodeParameterDeclarationExpression.cs
- LinqDataView.cs
- DataBinder.cs
- TaskExceptionHolder.cs
- TimelineGroup.cs
- OdbcInfoMessageEvent.cs
- MenuItemAutomationPeer.cs
- SecurityDescriptor.cs
- ResourceContainer.cs
- COAUTHIDENTITY.cs
- XmlSchemaSequence.cs
- IDataContractSurrogate.cs
- CodeArgumentReferenceExpression.cs
- TableParagraph.cs
- XmlSchemaGroupRef.cs
- XsdValidatingReader.cs
- ExtensionDataObject.cs