Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- DateTimeFormatInfoScanner.cs
- GacUtil.cs
- RepeaterItemCollection.cs
- ParseHttpDate.cs
- TripleDES.cs
- basecomparevalidator.cs
- SystemInformation.cs
- Span.cs
- Image.cs
- OdbcHandle.cs
- AxisAngleRotation3D.cs
- ProxyFragment.cs
- EditorPartDesigner.cs
- FigureHelper.cs
- CompositeFontInfo.cs
- HttpCachePolicyBase.cs
- LogSwitch.cs
- BrowserCapabilitiesFactory.cs
- ListCommandEventArgs.cs
- DataObjectAttribute.cs
- DocumentPageViewAutomationPeer.cs
- SpellerStatusTable.cs
- AttributeEmitter.cs
- WebEncodingValidatorAttribute.cs
- WebPartChrome.cs
- CompiledELinqQueryState.cs
- mactripleDES.cs
- AssemblyAssociatedContentFileAttribute.cs
- Metafile.cs
- EraserBehavior.cs
- OutputCacheSettings.cs
- WebPartTransformerAttribute.cs
- TypeBuilderInstantiation.cs
- WindowsFormsLinkLabel.cs
- FileSystemWatcher.cs
- Listener.cs
- XmlSchemaSimpleContentExtension.cs
- RawStylusActions.cs
- HttpEncoder.cs
- QuerySafeNavigator.cs
- RadioButtonFlatAdapter.cs
- HtmlWindowCollection.cs
- Module.cs
- DeclarativeCatalogPartDesigner.cs
- OperatingSystem.cs
- LocationSectionRecord.cs
- DbXmlEnabledProviderManifest.cs
- ClientConfigPaths.cs
- AssemblyCacheEntry.cs
- ServiceManager.cs
- WinCategoryAttribute.cs
- Vector.cs
- AssemblyCollection.cs
- Itemizer.cs
- StorageEntityContainerMapping.cs
- MethodBuilder.cs
- CounterSetInstanceCounterDataSet.cs
- MailMessageEventArgs.cs
- Helpers.cs
- FileVersionInfo.cs
- TimerEventSubscription.cs
- CheckoutException.cs
- CRYPTPROTECT_PROMPTSTRUCT.cs
- GridViewHeaderRowPresenterAutomationPeer.cs
- XmlDataSource.cs
- TaskbarItemInfo.cs
- HttpListenerResponse.cs
- DbConnectionHelper.cs
- PropertyDescriptorCollection.cs
- NamespaceList.cs
- FastEncoderWindow.cs
- XslTransform.cs
- TextServicesCompartmentEventSink.cs
- ConstNode.cs
- TabletDeviceInfo.cs
- CacheForPrimitiveTypes.cs
- StaticContext.cs
- FullTextBreakpoint.cs
- FileSecurity.cs
- Binding.cs
- Request.cs
- ObjectStateFormatter.cs
- UnaryNode.cs
- XmlEncodedRawTextWriter.cs
- JumpTask.cs
- StylusDevice.cs
- StateWorkerRequest.cs
- OracleInfoMessageEventArgs.cs
- ProfileService.cs
- FormViewRow.cs
- RunInstallerAttribute.cs
- RedistVersionInfo.cs
- SchemaNamespaceManager.cs
- TextParentUndoUnit.cs
- HtmlElementCollection.cs
- EffectiveValueEntry.cs
- QuinticEase.cs
- XamlInt32CollectionSerializer.cs
- RegexReplacement.cs
- VisualTransition.cs