Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx40 / Tools / System.Activities.Presentation / System / Activities / Presentation / Toolbox / TreeViewTemplateSelector.cs / 1305376 / TreeViewTemplateSelector.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace System.Activities.Presentation.Toolbox { using System.Windows; using System.Windows.Controls; // This class is resposible for selecting proper template for Category and Tool objects // (those entities have different values beeing displayed) sealed class TreeViewTemplateSelector : DataTemplateSelector { ToolboxControl owner; public TreeViewTemplateSelector(ToolboxControl owner) { this.owner = owner; } public override DataTemplate SelectTemplate(object item, DependencyObject container) { DataTemplate result = base.SelectTemplate(item, container); if (item is ToolboxItemWrapper && null != this.owner.ToolTemplate) { result = this.owner.ToolTemplate; } if (item is ToolboxCategory && null != this.owner.CategoryTemplate) { result = this.owner.CategoryTemplate; } return result; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ConfigXmlComment.cs
- SignatureDescription.cs
- ConnectionPoint.cs
- ConfigsHelper.cs
- DllNotFoundException.cs
- WindowProviderWrapper.cs
- ScrollChrome.cs
- UInt16.cs
- SchemeSettingElement.cs
- AttributeProviderAttribute.cs
- Int32CollectionConverter.cs
- DataError.cs
- ScrollViewer.cs
- RtType.cs
- SlotInfo.cs
- InternalReceiveMessage.cs
- TextChange.cs
- PreloadHost.cs
- XsltQilFactory.cs
- EncodingNLS.cs
- Axis.cs
- Point.cs
- OdbcConnectionFactory.cs
- PersianCalendar.cs
- IPAddressCollection.cs
- HighlightVisual.cs
- AggregationMinMaxHelpers.cs
- Schema.cs
- _AuthenticationState.cs
- XPathChildIterator.cs
- TypeReference.cs
- GridItemPatternIdentifiers.cs
- AbstractExpressions.cs
- RIPEMD160Managed.cs
- AssociationTypeEmitter.cs
- PkcsUtils.cs
- PreviewPageInfo.cs
- SafeRegistryHandle.cs
- DeclarativeCatalogPart.cs
- ToolStripGripRenderEventArgs.cs
- SectionXmlInfo.cs
- Soap.cs
- WindowsAuthenticationModule.cs
- MenuItemBindingCollection.cs
- BitmapDownload.cs
- BaseTemplateParser.cs
- Main.cs
- TypographyProperties.cs
- TemplateField.cs
- Registry.cs
- CircleHotSpot.cs
- _SecureChannel.cs
- StoryFragments.cs
- ResourcesBuildProvider.cs
- MulticastIPAddressInformationCollection.cs
- DbConnectionInternal.cs
- OdbcErrorCollection.cs
- IsolatedStoragePermission.cs
- QuaternionIndependentAnimationStorage.cs
- DurationConverter.cs
- objectresult_tresulttype.cs
- DataChangedEventManager.cs
- AppSettings.cs
- IconHelper.cs
- HttpDebugHandler.cs
- XPathDocumentIterator.cs
- WmpBitmapDecoder.cs
- CornerRadiusConverter.cs
- DbConnectionClosed.cs
- ClientFormsIdentity.cs
- ScriptManagerProxy.cs
- PartManifestEntry.cs
- Int32AnimationBase.cs
- XPathParser.cs
- TransformedBitmap.cs
- StreamWriter.cs
- DocumentSequenceHighlightLayer.cs
- CqlParser.cs
- SafeCryptoHandles.cs
- ValidatorAttribute.cs
- ArcSegment.cs
- _OSSOCK.cs
- ActivityBuilderHelper.cs
- DataSourceCacheDurationConverter.cs
- AttributeCollection.cs
- ReadOnlyDictionary.cs
- HttpConfigurationContext.cs
- RotateTransform.cs
- HttpRequestWrapper.cs
- LinqDataSourceView.cs
- Vector3DConverter.cs
- TextTreeInsertElementUndoUnit.cs
- TransactionManagerProxy.cs
- SQLMembershipProvider.cs
- KeyboardNavigation.cs
- PartialCachingAttribute.cs
- StorageComplexTypeMapping.cs
- BaseParagraph.cs
- WinInet.cs
- WinFormsSpinner.cs