DataTemplate Class
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.
A template for multiple bindings, commonly used by ListViews and MultiPage<T>s.
public ref class DataTemplate : Microsoft::Maui::Controls::ElementTemplate, Microsoft::Maui::Controls::Internals::IDataTemplateController
public class DataTemplate : Microsoft.Maui.Controls.ElementTemplate, Microsoft.Maui.Controls.Internals.IDataTemplateController
type DataTemplate = class
inherit ElementTemplate
interface IDataTemplateController
Public Class DataTemplate
Inherits ElementTemplate
Implements IDataTemplateController
- Inheritance
- Derived
- Implements
Remarks
In XAML, application developers can nest markup inside a DataTemplate
tag to create a View whose members are bound to the properties of data objects that are contained in a ItemsSource list.
Constructors
DataTemplate() |
For internal use only. |
DataTemplate(Func<Object>) |
Creates and initializes a new instance of the DataTemplate class. |
DataTemplate(Type) |
Creates a new DataTemplate for type |
Properties
Bindings |
Gets a dictionary of bindings, indexed by the bound properties. |
LoadTemplate | (Inherited from ElementTemplate) |
Values |
Returns a dictionary of property values for this DataTemplate, indexed by property. |
Methods
CreateContent() |
Used by the XAML infrastructure to load data templates and set up the content of the resulting UI. (Inherited from ElementTemplate) |
SetBinding(BindableProperty, BindingBase) |
Sets the binding for |
SetValue(BindableProperty, Object) |
Sets the value of |
Explicit Interface Implementations
IDataTemplateController.Id | |
IDataTemplateController.IdString |
Extension Methods
CreateContent(DataTemplate, Object, BindableObject) |
For internal use by the Microsoft.Maui.Controls platform. |
SelectDataTemplate(DataTemplate, Object, BindableObject) |
For internal use by the Microsoft.Maui.Controls platform. |
SetBinding(DataTemplate, BindableProperty, String) |
Binds the |
Applies to
.NET MAUI
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기