Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / Markup / TemplateComponentConnector.cs / 1305600 / 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
- Annotation.cs
- FontCacheLogic.cs
- CodeDirectiveCollection.cs
- DataGridAddNewRow.cs
- Pkcs7Signer.cs
- TextTabProperties.cs
- EntityDataSourceChangingEventArgs.cs
- SqlAggregateChecker.cs
- QilFunction.cs
- EventEntry.cs
- TypedServiceChannelBuilder.cs
- FolderBrowserDialog.cs
- TypedElement.cs
- BaseResourcesBuildProvider.cs
- LowerCaseStringConverter.cs
- XsltArgumentList.cs
- InvalidateEvent.cs
- BrowserTree.cs
- LexicalChunk.cs
- StorageAssociationSetMapping.cs
- HtmlElementCollection.cs
- QueryHandler.cs
- ProxyWebPartConnectionCollection.cs
- TextRenderingModeValidation.cs
- AlphaSortedEnumConverter.cs
- CodeValidator.cs
- DbMetaDataCollectionNames.cs
- DBAsyncResult.cs
- UshortList2.cs
- TypeReference.cs
- SqlMethodAttribute.cs
- ToolBarButtonClickEvent.cs
- Not.cs
- FixedStringLookup.cs
- dataprotectionpermissionattribute.cs
- XmlNamespaceManager.cs
- AdornerPresentationContext.cs
- ButtonChrome.cs
- QueryReaderSettings.cs
- CodeVariableDeclarationStatement.cs
- UniqueEventHelper.cs
- Variant.cs
- CodeComment.cs
- EventBuilder.cs
- SoundPlayer.cs
- SerializationObjectManager.cs
- ImageAutomationPeer.cs
- MouseActionValueSerializer.cs
- StorageAssociationTypeMapping.cs
- AsnEncodedData.cs
- ActiveXHelper.cs
- SiteMapDataSourceView.cs
- ScriptResourceHandler.cs
- Atom10FormatterFactory.cs
- XmlSchemaDatatype.cs
- BackgroundWorker.cs
- TextDecoration.cs
- TextServicesProperty.cs
- DataGridViewCellConverter.cs
- VerticalAlignConverter.cs
- StrongNameIdentityPermission.cs
- HttpCacheVaryByContentEncodings.cs
- Empty.cs
- MonthChangedEventArgs.cs
- WebPartDisplayModeEventArgs.cs
- TypeElement.cs
- UnsafePeerToPeerMethods.cs
- TabControlAutomationPeer.cs
- XmlStreamStore.cs
- QueryOperationResponseOfT.cs
- XPathParser.cs
- ContentPosition.cs
- FixedHighlight.cs
- TimeZone.cs
- HebrewNumber.cs
- CodeArrayCreateExpression.cs
- DataPagerFieldCommandEventArgs.cs
- CodeAccessPermission.cs
- Set.cs
- SystemResources.cs
- WsatTransactionHeader.cs
- RadioButtonAutomationPeer.cs
- SafeCryptContextHandle.cs
- AdornerLayer.cs
- SqlProviderUtilities.cs
- MeshGeometry3D.cs
- UrlRoutingModule.cs
- DictionaryCustomTypeDescriptor.cs
- ErasingStroke.cs
- HierarchicalDataBoundControl.cs
- DataListAutoFormat.cs
- XmlName.cs
- __Error.cs
- ExpressionLexer.cs
- RangeContentEnumerator.cs
- TaskFormBase.cs
- SqlCrossApplyToCrossJoin.cs
- SoapReflectionImporter.cs
- ToolStripScrollButton.cs
- CallInfo.cs