Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Framework / System / Windows / Controls / DataTemplateSelector.cs / 1 / DataTemplateSelector.cs
//----------------------------------------------------------------------------
//
//
// Copyright (C) Microsoft Corporation. All rights reserved.
//
//
// Description: DataTemplateSelector allows the app writer to provide custom template selection logic.
//
// Specs: [....]/coreui/Specs%20%20Property%20Engine/Styling%20Revisited.doc
//
//---------------------------------------------------------------------------
namespace System.Windows.Controls
{
///
///
/// DataTemplateSelector allows the app writer to provide custom template selection logic.
/// For example, with a class Bug as the Content,
/// use a particular template for Pri1 bugs and a different template for Pri2 bugs.
///
///
/// An application writer can override the SelectTemplate method in a derived
/// selector class and assign an instance of this class to the ContentTemplateSelector property on
/// class.
///
///
public class DataTemplateSelector
{
///
/// Override this method to return an app specific .
///
/// The data content
/// The element to which the template will be applied
/// an app-specific template to apply, or null.
public virtual DataTemplate SelectTemplate(object item, DependencyObject container)
{
return null;
}
}
}
// 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
- ConnectionInterfaceCollection.cs
- DataGridViewColumnDesigner.cs
- Speller.cs
- TogglePattern.cs
- SectionUpdates.cs
- AdCreatedEventArgs.cs
- Panel.cs
- Msec.cs
- NetworkStream.cs
- ConfigurationPropertyAttribute.cs
- SmiMetaDataProperty.cs
- SmtpNetworkElement.cs
- TemplateBaseAction.cs
- NodeLabelEditEvent.cs
- RefreshEventArgs.cs
- DataGridViewAccessibleObject.cs
- TreeNodeBinding.cs
- Help.cs
- EnterpriseServicesHelper.cs
- GuidelineCollection.cs
- PenThread.cs
- PasswordDeriveBytes.cs
- FixedSOMTable.cs
- DataControlCommands.cs
- ErrorTableItemStyle.cs
- TransactedReceiveScope.cs
- CompiledQuery.cs
- QuaternionAnimationUsingKeyFrames.cs
- AddInIpcChannel.cs
- TextContainerChangeEventArgs.cs
- ExtenderProvidedPropertyAttribute.cs
- EncryptedPackage.cs
- XamlReader.cs
- AutoGeneratedFieldProperties.cs
- IIS7ConfigurationLoader.cs
- _CookieModule.cs
- ObjectQuery.cs
- TemplateControlCodeDomTreeGenerator.cs
- XmlSchemaSimpleContentExtension.cs
- ThemeableAttribute.cs
- ObjectQuery.cs
- CheckBoxField.cs
- PkcsMisc.cs
- RecognizerInfo.cs
- _KerberosClient.cs
- printdlgexmarshaler.cs
- DataMemberFieldEditor.cs
- CroppedBitmap.cs
- HtmlTernaryTree.cs
- GifBitmapEncoder.cs
- SignatureResourcePool.cs
- SqlDataSourceQuery.cs
- Context.cs
- ItemsPanelTemplate.cs
- TypeBuilder.cs
- FixedDocumentPaginator.cs
- MsdtcWrapper.cs
- SqlErrorCollection.cs
- ObjectParameter.cs
- TabControlAutomationPeer.cs
- MetadataHelper.cs
- CounterSample.cs
- Quaternion.cs
- RelationshipDetailsCollection.cs
- FontNamesConverter.cs
- EpmContentSerializer.cs
- AbandonedMutexException.cs
- DetailsViewUpdateEventArgs.cs
- ClrPerspective.cs
- Size3DConverter.cs
- DataReaderContainer.cs
- Deflater.cs
- SqlDataSource.cs
- WebPart.cs
- ResXResourceReader.cs
- FamilyCollection.cs
- FlowDocumentReader.cs
- COMException.cs
- RequestStatusBarUpdateEventArgs.cs
- Stream.cs
- ProtocolViolationException.cs
- Frame.cs
- CapabilitiesUse.cs
- AuthenticationServiceManager.cs
- PrintDialog.cs
- RadioButtonList.cs
- PlainXmlDeserializer.cs
- UncommonField.cs
- RenderTargetBitmap.cs
- DiscoveryClientReferences.cs
- ColumnResult.cs
- TabControl.cs
- XmlSchemaValidator.cs
- StackOverflowException.cs
- DataSourceCache.cs
- WebColorConverter.cs
- BitmapImage.cs
- QuaternionAnimationBase.cs
- Parser.cs
- StaticTextPointer.cs