ItemContainerTemplateSelector.SelectTemplate(Object, ItemsControl) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
When overridden in a derived class, returns an ItemContainerTemplate based on custom logic.
public:
virtual System::Windows::DataTemplate ^ SelectTemplate(System::Object ^ item, System::Windows::Controls::ItemsControl ^ parentItemsControl);
public virtual System.Windows.DataTemplate SelectTemplate (object item, System.Windows.Controls.ItemsControl parentItemsControl);
abstract member SelectTemplate : obj * System.Windows.Controls.ItemsControl -> System.Windows.DataTemplate
override this.SelectTemplate : obj * System.Windows.Controls.ItemsControl -> System.Windows.DataTemplate
Public Overridable Function SelectTemplate (item As Object, parentItemsControl As ItemsControl) As DataTemplate
Parameters
- item
- Object
The object for which to select the template.
- parentItemsControl
- ItemsControl
The container for the items.
Returns
The template. The default implementation returns null
.
Applies to
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.