Code:
/ 4.0 / 4.0 / untmp / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Double.cs
- WasEndpointConfigContainer.cs
- HandledEventArgs.cs
- ActivitiesCollection.cs
- SplitterPanel.cs
- XPathDocumentBuilder.cs
- MDIWindowDialog.cs
- NativeRecognizer.cs
- DispatcherEventArgs.cs
- ViewValidator.cs
- TextRenderer.cs
- OleDbErrorCollection.cs
- ObjectDataSourceMethodEventArgs.cs
- Application.cs
- Clock.cs
- ExpressionBinding.cs
- Native.cs
- AuthStoreRoleProvider.cs
- CacheMemory.cs
- DataRecordInfo.cs
- XmlComplianceUtil.cs
- Descriptor.cs
- WorkflowElementDialog.cs
- PropertyInfo.cs
- QueryOperationResponseOfT.cs
- LineBreakRecord.cs
- TreeNode.cs
- XamlToRtfParser.cs
- ProviderUtil.cs
- WmlObjectListAdapter.cs
- SettingsProperty.cs
- DateTimeValueSerializerContext.cs
- GridViewRow.cs
- InternalConfigEventArgs.cs
- Number.cs
- LeaseManager.cs
- OleDbParameter.cs
- mediapermission.cs
- XPathSelfQuery.cs
- NativeMethods.cs
- AvTraceFormat.cs
- __FastResourceComparer.cs
- ViewPort3D.cs
- SQLBinary.cs
- Crc32.cs
- DocumentPage.cs
- PtsHelper.cs
- FileInfo.cs
- AccessibleObject.cs
- SqlEnums.cs
- PerformanceCounterPermissionEntryCollection.cs
- WindowsImpersonationContext.cs
- SignatureResourcePool.cs
- WindowsIPAddress.cs
- StringFormat.cs
- ListItemCollection.cs
- LogExtent.cs
- AsyncDataRequest.cs
- _NegotiateClient.cs
- AbandonedMutexException.cs
- CapiHashAlgorithm.cs
- ListSurrogate.cs
- _SingleItemRequestCache.cs
- SqlDesignerDataSourceView.cs
- SamlSecurityTokenAuthenticator.cs
- SetterBase.cs
- cookie.cs
- EventProperty.cs
- UnsafeNativeMethodsMilCoreApi.cs
- WizardStepBase.cs
- SettingsProviderCollection.cs
- ObjectDataSource.cs
- ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs
- BufferedGraphics.cs
- WebAdminConfigurationHelper.cs
- Missing.cs
- DataTableCollection.cs
- StringBlob.cs
- oledbmetadatacollectionnames.cs
- Tablet.cs
- Selection.cs
- EventDescriptor.cs
- Span.cs
- RowCache.cs
- SQLMembershipProvider.cs
- serverconfig.cs
- DataGridViewHeaderCell.cs
- VisualStyleRenderer.cs
- TransformFinalBlockRequest.cs
- XmlRootAttribute.cs
- ProxyWebPartConnectionCollection.cs
- ArraySortHelper.cs
- SpAudioStreamWrapper.cs
- TraceContextEventArgs.cs
- TextModifier.cs
- GeneralTransformCollection.cs
- XmlSchemaComplexType.cs
- NameValuePair.cs
- ListView.cs
- PropertyInfoSet.cs