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
- DataGridViewCellCancelEventArgs.cs
- AspProxy.cs
- ToolBar.cs
- InputBuffer.cs
- TraversalRequest.cs
- DataGridrowEditEndingEventArgs.cs
- Thread.cs
- MergeLocalizationDirectives.cs
- Matrix.cs
- TextEffectResolver.cs
- SHA256.cs
- FixedLineResult.cs
- ApplicationManager.cs
- Property.cs
- TextProviderWrapper.cs
- ObjectDataSourceFilteringEventArgs.cs
- ExternalFile.cs
- Cursors.cs
- NameSpaceExtractor.cs
- XmlSchemaInclude.cs
- PropertyChange.cs
- ObjectSelectorEditor.cs
- EntityDesignerBuildProvider.cs
- NetWebProxyFinder.cs
- XmlRawWriter.cs
- SiteOfOriginPart.cs
- SoapElementAttribute.cs
- PersonalizableAttribute.cs
- ScriptingWebServicesSectionGroup.cs
- DataGridViewComboBoxCell.cs
- safelinkcollection.cs
- Latin1Encoding.cs
- AndMessageFilterTable.cs
- Model3D.cs
- ToolStripManager.cs
- QuaternionRotation3D.cs
- SoapIgnoreAttribute.cs
- TypeBuilder.cs
- MsmqIntegrationProcessProtocolHandler.cs
- SqlNotificationRequest.cs
- CategoryNameCollection.cs
- ParsedAttributeCollection.cs
- ButtonChrome.cs
- MulticastOption.cs
- DependencyPropertyHelper.cs
- coordinatorscratchpad.cs
- BooleanStorage.cs
- LinqDataSourceInsertEventArgs.cs
- HttpBindingExtension.cs
- Evidence.cs
- Subtree.cs
- columnmapfactory.cs
- XPathPatternBuilder.cs
- FloaterBaseParagraph.cs
- CodeDOMProvider.cs
- WeakEventTable.cs
- StateFinalizationDesigner.cs
- BamlRecordHelper.cs
- EditCommandColumn.cs
- dsa.cs
- Invariant.cs
- WizardForm.cs
- SendActivityDesignerTheme.cs
- BaseCollection.cs
- DBSchemaRow.cs
- DataGridDetailsPresenter.cs
- ContentPosition.cs
- KeyValueConfigurationCollection.cs
- SoapExtensionTypeElementCollection.cs
- TypeExtension.cs
- SmiContextFactory.cs
- webeventbuffer.cs
- SerializationEventsCache.cs
- Point3DAnimationBase.cs
- ModuleConfigurationInfo.cs
- CountdownEvent.cs
- safex509handles.cs
- ValidationEventArgs.cs
- StyleSelector.cs
- PageBuildProvider.cs
- TokenBasedSetEnumerator.cs
- MailSettingsSection.cs
- SizeConverter.cs
- WbmpConverter.cs
- RightsManagementInformation.cs
- WindowClosedEventArgs.cs
- WindowsSolidBrush.cs
- Int64Animation.cs
- SystemMulticastIPAddressInformation.cs
- KeyManager.cs
- ManagementQuery.cs
- CapacityStreamGeometryContext.cs
- Error.cs
- PathFigure.cs
- LogicalChannel.cs
- IncrementalHitTester.cs
- CodeRemoveEventStatement.cs
- WebRequestModulesSection.cs
- ContextMarshalException.cs
- ErrorStyle.cs