Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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

C#
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