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
- TransformerConfigurationWizardBase.cs
- TemplateNameScope.cs
- ValidatedControlConverter.cs
- GorillaCodec.cs
- TiffBitmapEncoder.cs
- WS2007FederationHttpBindingCollectionElement.cs
- Size3DValueSerializer.cs
- SrgsElementFactory.cs
- ConvertBinder.cs
- ThreadPool.cs
- XsdBuildProvider.cs
- RemoteWebConfigurationHost.cs
- HwndSubclass.cs
- DataGridViewBindingCompleteEventArgs.cs
- EntityUtil.cs
- ScriptingWebServicesSectionGroup.cs
- CodeFieldReferenceExpression.cs
- CheckBoxList.cs
- WebPartMinimizeVerb.cs
- IdentitySection.cs
- BitmapData.cs
- StylusButtonCollection.cs
- AxisAngleRotation3D.cs
- NativeRightsManagementAPIsStructures.cs
- IgnoreSection.cs
- DBCommandBuilder.cs
- SafeNativeMethods.cs
- ControlValuePropertyAttribute.cs
- RelatedImageListAttribute.cs
- __TransparentProxy.cs
- BrowserCapabilitiesFactory35.cs
- Perspective.cs
- OleDbException.cs
- PowerStatus.cs
- Queue.cs
- LoopExpression.cs
- MailMessageEventArgs.cs
- SqlDataRecord.cs
- ColorContextHelper.cs
- MarginsConverter.cs
- ScalarType.cs
- SignatureSummaryDialog.cs
- QilUnary.cs
- SourceLocation.cs
- SqlDataReaderSmi.cs
- DataGridViewAdvancedBorderStyle.cs
- StringArrayConverter.cs
- ValidationPropertyAttribute.cs
- Message.cs
- GenericEnumerator.cs
- RewritingValidator.cs
- ChangeDirector.cs
- BinaryParser.cs
- IsolatedStorageSecurityState.cs
- Enlistment.cs
- SoapFault.cs
- WindowsToolbarItemAsMenuItem.cs
- HtmlCalendarAdapter.cs
- xmlsaver.cs
- DBParameter.cs
- DisplayToken.cs
- CookielessHelper.cs
- SignedPkcs7.cs
- Token.cs
- ScrollEventArgs.cs
- ValidationVisibilityAttribute.cs
- Int32Animation.cs
- TypedDataSourceCodeGenerator.cs
- BasePropertyDescriptor.cs
- Span.cs
- PackageProperties.cs
- AssociatedControlConverter.cs
- TextRange.cs
- NumberFunctions.cs
- TextViewElement.cs
- BufferedGraphics.cs
- OleDbParameter.cs
- FacetDescriptionElement.cs
- Identifier.cs
- metadatamappinghashervisitor.cs
- invalidudtexception.cs
- Light.cs
- GenericTextProperties.cs
- CellNormalizer.cs
- DataGridViewRowPostPaintEventArgs.cs
- EntityDataReader.cs
- StylusPlugInCollection.cs
- ContentElement.cs
- ReceiveCompletedEventArgs.cs
- DelimitedListTraceListener.cs
- DisposableCollectionWrapper.cs
- DataTable.cs
- GridViewAutomationPeer.cs
- MgmtConfigurationRecord.cs
- AsymmetricKeyExchangeFormatter.cs
- ToolTipAutomationPeer.cs
- ToolStripScrollButton.cs
- XmlDataDocument.cs
- SqlCaseSimplifier.cs
- VisualStyleRenderer.cs