Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / wpf / src / 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: 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.
//----------------------------------------------------------------------------
//
//
// 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
- PageTheme.cs
- PeerNameRecord.cs
- XmlUtil.cs
- CodeExpressionRuleDeclaration.cs
- Win32PrintDialog.cs
- MatrixCamera.cs
- DataGridViewRowConverter.cs
- WindowsButton.cs
- MenuCommand.cs
- TraceHandler.cs
- CompositeScriptReference.cs
- WebEventCodes.cs
- Serializer.cs
- ArraySubsetEnumerator.cs
- EventProxy.cs
- SourceElementsCollection.cs
- DocumentReference.cs
- WebPartConnectionsEventArgs.cs
- DataTableNewRowEvent.cs
- PasswordTextNavigator.cs
- AutomationPeer.cs
- EUCJPEncoding.cs
- DataListComponentEditor.cs
- WebPartManagerInternals.cs
- ApplicationException.cs
- QueryPageSettingsEventArgs.cs
- WorkflowNamespace.cs
- IntSecurity.cs
- AssemblyName.cs
- ADConnectionHelper.cs
- COM2ExtendedUITypeEditor.cs
- SqlUtils.cs
- SkipQueryOptionExpression.cs
- GenericXmlSecurityToken.cs
- DrawingCollection.cs
- ObjectListCommandsPage.cs
- XsltLibrary.cs
- _ConnectOverlappedAsyncResult.cs
- NotifyParentPropertyAttribute.cs
- XmlAttributeAttribute.cs
- DiscoveryClientReferences.cs
- CustomCategoryAttribute.cs
- sqlmetadatafactory.cs
- ClosableStream.cs
- RecoverInstanceLocksCommand.cs
- AuthenticationConfig.cs
- LostFocusEventManager.cs
- MatrixAnimationBase.cs
- Environment.cs
- ConfigurationSection.cs
- SafeRightsManagementQueryHandle.cs
- Executor.cs
- SelectionPatternIdentifiers.cs
- GridViewUpdateEventArgs.cs
- FormsAuthenticationModule.cs
- ImageAnimator.cs
- GridViewDeletedEventArgs.cs
- ResourceSet.cs
- WebRequest.cs
- UserControlBuildProvider.cs
- ReferencedAssembly.cs
- ExpressionVisitorHelpers.cs
- TemplateBaseAction.cs
- SqlNamer.cs
- HtmlInputCheckBox.cs
- DelegateSerializationHolder.cs
- InlineCollection.cs
- JoinSymbol.cs
- CodeFieldReferenceExpression.cs
- DeferredTextReference.cs
- SymLanguageType.cs
- Brushes.cs
- ConditionalBranch.cs
- DataBindingHandlerAttribute.cs
- ItemCollection.cs
- SapiGrammar.cs
- XmlWellformedWriter.cs
- TableCell.cs
- SchemaRegistration.cs
- DesigntimeLicenseContextSerializer.cs
- Pipe.cs
- TemplateInstanceAttribute.cs
- SafeFileMapViewHandle.cs
- UseLicense.cs
- UIElementHelper.cs
- ActivityExecutorSurrogate.cs
- CategoryNameCollection.cs
- WindowsListViewScroll.cs
- _LocalDataStoreMgr.cs
- XmlCharCheckingWriter.cs
- MgmtConfigurationRecord.cs
- FieldNameLookup.cs
- QualifierSet.cs
- EnumerationRangeValidationUtil.cs
- CheckBox.cs
- WebHttpBindingElement.cs
- SecurityTokenResolver.cs
- BulletChrome.cs
- IODescriptionAttribute.cs
- SqlDataSourceView.cs