Code:
/ 4.0 / 4.0 / 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. //------------------------------------------------------------ // 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
- iisPickupDirectory.cs
- XmlSchemaGroupRef.cs
- TraceShell.cs
- Descriptor.cs
- DataView.cs
- RandomDelayQueuedSendsAsyncResult.cs
- OleDbParameter.cs
- ActionFrame.cs
- PasswordRecovery.cs
- MenuBindingsEditor.cs
- WindowsScrollBarBits.cs
- ErrorWebPart.cs
- FirstMatchCodeGroup.cs
- VirtualizedCellInfoCollection.cs
- UrlPropertyAttribute.cs
- RegexNode.cs
- XmlCharCheckingWriter.cs
- TableLayoutPanelCellPosition.cs
- Codec.cs
- OdbcPermission.cs
- PropertyPath.cs
- WebEventCodes.cs
- RegularExpressionValidator.cs
- DecimalKeyFrameCollection.cs
- QueryConverter.cs
- BoundPropertyEntry.cs
- ParallelDesigner.xaml.cs
- TransformedBitmap.cs
- RichTextBoxContextMenu.cs
- codemethodreferenceexpression.cs
- WebReferenceCollection.cs
- ArrayElementGridEntry.cs
- SoapExtensionStream.cs
- HashCryptoHandle.cs
- NegotiationTokenAuthenticatorState.cs
- FormViewInsertEventArgs.cs
- TakeQueryOptionExpression.cs
- HttpWebRequest.cs
- FeatureSupport.cs
- InvokeBinder.cs
- TypeContext.cs
- XmlStreamedByteStreamReader.cs
- MetadataCache.cs
- ClientFormsIdentity.cs
- ThemeInfoAttribute.cs
- MetricEntry.cs
- QueryRewriter.cs
- PartialTrustHelpers.cs
- UpdatePanel.cs
- PanelStyle.cs
- MetricEntry.cs
- ThemeableAttribute.cs
- TimeoutHelper.cs
- UnsafeNetInfoNativeMethods.cs
- FileUpload.cs
- BitmapCodecInfoInternal.cs
- WebServiceErrorEvent.cs
- DynamicRenderer.cs
- ToolboxService.cs
- ReadOnlyCollectionBuilder.cs
- SqlPersonalizationProvider.cs
- ChildTable.cs
- Duration.cs
- WindowsTab.cs
- DiscoveryDocument.cs
- WebBrowserSiteBase.cs
- UpdateCommand.cs
- QuaternionAnimationBase.cs
- InternalTypeHelper.cs
- WebBrowsableAttribute.cs
- RemoteEndpointMessageProperty.cs
- CommonRemoteMemoryBlock.cs
- Int32KeyFrameCollection.cs
- Size.cs
- PlainXmlWriter.cs
- BaseHashHelper.cs
- HtmlUtf8RawTextWriter.cs
- SequentialWorkflowRootDesigner.cs
- FileDataSourceCache.cs
- ConfigXmlCDataSection.cs
- StaticSiteMapProvider.cs
- MultiSelector.cs
- MetadataUtilsSmi.cs
- TextElementAutomationPeer.cs
- WindowsGraphics.cs
- RedirectionProxy.cs
- HostProtectionPermission.cs
- IndexedDataBuffer.cs
- NameObjectCollectionBase.cs
- SiteIdentityPermission.cs
- SqlCacheDependency.cs
- ReadOnlyDictionary.cs
- ProfileInfo.cs
- ImageField.cs
- EventOpcode.cs
- MemberInfoSerializationHolder.cs
- HttpPostedFile.cs
- SqlDataRecord.cs
- PrintController.cs
- GraphicsContainer.cs