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
- IResourceProvider.cs
- InfoCardConstants.cs
- ThaiBuddhistCalendar.cs
- ToolStripScrollButton.cs
- BinaryKeyIdentifierClause.cs
- KeyValueConfigurationElement.cs
- Bold.cs
- SelectionManager.cs
- WebContext.cs
- SettingsProviderCollection.cs
- RangeValidator.cs
- X509DefaultServiceCertificateElement.cs
- QueuePropertyVariants.cs
- ServicePointManagerElement.cs
- MachineKeySection.cs
- DependencyPropertyConverter.cs
- BindingElementExtensionElement.cs
- EntityDataSourceDataSelection.cs
- HelpInfo.cs
- ObjectDataSourceSelectingEventArgs.cs
- ConnectionPoolManager.cs
- COM2EnumConverter.cs
- PanningMessageFilter.cs
- ApplicationCommands.cs
- UmAlQuraCalendar.cs
- UserControlAutomationPeer.cs
- ItemCheckEvent.cs
- AssociationSet.cs
- CssStyleCollection.cs
- EUCJPEncoding.cs
- CatalogZoneBase.cs
- RegularExpressionValidator.cs
- ChangeToolStripParentVerb.cs
- CheckBoxFlatAdapter.cs
- Util.cs
- ThemeableAttribute.cs
- EmbeddedMailObject.cs
- WCFBuildProvider.cs
- GPStream.cs
- Token.cs
- AdornerLayer.cs
- MLangCodePageEncoding.cs
- NativeMethodsOther.cs
- ListGeneralPage.cs
- DataGridParentRows.cs
- UIServiceHelper.cs
- ExpressionConverter.cs
- ExpressionConverter.cs
- KeyValueSerializer.cs
- DataServiceHost.cs
- FlowDocumentScrollViewerAutomationPeer.cs
- BufferAllocator.cs
- DynamicDiscoSearcher.cs
- FormView.cs
- Transform.cs
- ComProxy.cs
- SQLInt32Storage.cs
- DataGridViewColumnDesigner.cs
- TextSegment.cs
- ReadWriteSpinLock.cs
- ZoneLinkButton.cs
- DirtyTextRange.cs
- DataGridViewColumnEventArgs.cs
- _HTTPDateParse.cs
- HttpContextWrapper.cs
- StateMachineSubscription.cs
- WorkflowTimerService.cs
- GacUtil.cs
- Point3DAnimationUsingKeyFrames.cs
- ColumnCollection.cs
- DataSourceCache.cs
- TabPage.cs
- OpCodes.cs
- SAPICategories.cs
- RuntimeConfigLKG.cs
- InvalidAsynchronousStateException.cs
- SqlUnionizer.cs
- DataGridViewCellStyleChangedEventArgs.cs
- TextTrailingWordEllipsis.cs
- PropertyDescriptorComparer.cs
- ActivityTypeResolver.xaml.cs
- SqlStream.cs
- CompilationSection.cs
- SerializationHelper.cs
- MatrixTransform3D.cs
- FragmentNavigationEventArgs.cs
- UidPropertyAttribute.cs
- SystemIPGlobalProperties.cs
- IndentedTextWriter.cs
- ProfileParameter.cs
- Win32Native.cs
- Model3DGroup.cs
- Single.cs
- NetworkAddressChange.cs
- InfoCardRSAPKCS1SignatureDeformatter.cs
- FieldToken.cs
- ArrayElementGridEntry.cs
- EntityDataReader.cs
- _LoggingObject.cs
- TabControl.cs