Skip to main content

FormItemBase.ImageTemplate Property

Gets or sets a template that configures the image content and appearance. This is a bindable property.

Namespace: DevExpress.Maui.Editors

Assembly: DevExpress.Maui.Editors.dll

NuGet Package: DevExpress.Maui.Editors

Declaration

public DataTemplate ImageTemplate { get; set; }

Property Value

Type Description
DataTemplate

A data template.

Example

The following example shows how to create a DataTemplate to customize the image’s content:

DevExpress FormItem for MAUI - Image template customization

<ContentPage ...
             xmlns:dxco="clr-namespace:DevExpress.Maui.Controls;assembly=DevExpress.Maui.Controls"
             ...>
        <ScrollView>
            <VerticalStackLayout>
                <dxe:FormItem Text="Brightness level"
                              TextMargin="4,4,4,16"
                              InlineContent="80%"
                              ShowArrow="True">
                    <dxe:FormItem.ImageTemplate>
                        <DataTemplate>
                            <Border StrokeThickness="2" Stroke="LightGray"
                                    WidthRequest="50" HeightRequest="50"
                                    VerticalOptions="Start">
                                <dxco:DXImage Source="brightness"
                                              TintColor="#F9C938"
                                              WidthRequest="30"
                                              HeightRequest="30"/>
                            </Border>
                        </DataTemplate>
                    </dxe:FormItem.ImageTemplate>
                </dxe:FormItem>
            </VerticalStackLayout>
        </ScrollView>
</ContentPage>
See Also