Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / Controls / DataTemplateSelector.cs / 1305600 / DataTemplateSelector.cs
//----------------------------------------------------------------------------
//
//
// Copyright (C) Microsoft Corporation. All rights reserved.
//
//
// Description: DataTemplateSelector allows the app writer to provide custom template selection logic.
//
// Specs: http://avalon/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
- BinHexEncoder.cs
- TextEncodedRawTextWriter.cs
- DiffuseMaterial.cs
- MaskDesignerDialog.cs
- UIElement.cs
- MonthChangedEventArgs.cs
- StaticDataManager.cs
- TextShapeableCharacters.cs
- Connector.cs
- TableRowCollection.cs
- SystemColorTracker.cs
- XhtmlBasicListAdapter.cs
- SettingsAttributes.cs
- ArgumentNullException.cs
- SignalGate.cs
- ProtocolsConfiguration.cs
- DesignTimeTemplateParser.cs
- RouteItem.cs
- ExceptionValidationRule.cs
- XPathNodeIterator.cs
- LockRecursionException.cs
- SHA256.cs
- EventManager.cs
- PropertyTabAttribute.cs
- PerformanceCounterTraceRecord.cs
- XPathNodeList.cs
- LoginCancelEventArgs.cs
- BindingExpressionUncommonField.cs
- StateManagedCollection.cs
- ReadContentAsBinaryHelper.cs
- NavigationProgressEventArgs.cs
- PersistenceIOParticipant.cs
- ExceptionRoutedEventArgs.cs
- RealProxy.cs
- RtType.cs
- SystemIPGlobalStatistics.cs
- ReaderContextStackData.cs
- GifBitmapDecoder.cs
- LinqDataSource.cs
- ComponentCache.cs
- XmlSortKey.cs
- ObjectSet.cs
- DirectionalLight.cs
- TextServicesCompartment.cs
- WebPartManagerInternals.cs
- MatrixCamera.cs
- Point3D.cs
- PrivilegedConfigurationManager.cs
- BrowserCapabilitiesFactory.cs
- ToolStripDesignerAvailabilityAttribute.cs
- BaseInfoTable.cs
- XmlUtil.cs
- ExpressionBuilderContext.cs
- Rotation3DAnimationUsingKeyFrames.cs
- ControlBuilderAttribute.cs
- OutputScope.cs
- HttpListenerContext.cs
- OleDbParameter.cs
- ColorMatrix.cs
- ActivityTypeResolver.xaml.cs
- Stroke2.cs
- ExecutedRoutedEventArgs.cs
- Int32CollectionConverter.cs
- DesignerCategoryAttribute.cs
- ContainerCodeDomSerializer.cs
- ImpersonateTokenRef.cs
- CalendarKeyboardHelper.cs
- DispatchWrapper.cs
- EventLogPermission.cs
- ThicknessAnimationBase.cs
- StandardTransformFactory.cs
- Pair.cs
- SiteMapPath.cs
- ConfigXmlElement.cs
- TextCollapsingProperties.cs
- XamlTypeMapper.cs
- MappingModelBuildProvider.cs
- Point3DCollection.cs
- SingleConverter.cs
- Win32PrintDialog.cs
- ConfigXmlComment.cs
- StringSource.cs
- Native.cs
- WsdlEndpointConversionContext.cs
- GroupLabel.cs
- UidManager.cs
- SspiSafeHandles.cs
- DetailsViewPagerRow.cs
- Delay.cs
- HttpConfigurationContext.cs
- SiteMapDataSource.cs
- VSWCFServiceContractGenerator.cs
- XmlDataImplementation.cs
- UpWmlPageAdapter.cs
- Rijndael.cs
- DSACryptoServiceProvider.cs
- ObjectHelper.cs
- ChtmlFormAdapter.cs
- GcSettings.cs
- TryExpression.cs