Skip to main content

DataFormView.ContentPadding Property

Gets or sets the distance between editors and the data form’s borders or group headers.

Namespace: DevExpress.XamarinForms.DataForm

Assembly: DevExpress.XamarinForms.Editors.dll

NuGet Package: DevExpress.XamarinForms.Editors

Declaration

public Thickness ContentPadding { get; set; }

Property Value

Type
Thickness

Remarks

Example

This example demonstrates how to customize the data form’s editors, group headers, and row separators.

Before

After

  1. Override resources to modify the appearance of the data form’s editors (hide edit box borders and the clear icon, and change placeholder and input text color).
  2. Use the following properties of the data form:

    <ContentPage
    xmlns="http://xamarin.com/schemas/2014/forms"
    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
    xmlns:d="http://xamarin.com/schemas/2014/forms/design"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:dxdf="http://schemas.devexpress.com/xamarin/2014/forms/dataform"
    xmlns:dxe="http://schemas.devexpress.com/xamarin/2014/forms/editors"
    xmlns:ios="clr-namespace:Xamarin.Forms.PlatformConfiguration.iOSSpecific;assembly=Xamarin.Forms.Core"
    mc:Ignorable="d"
    x:Class="DataFormExample.MainPage"
    ios:Page.UseSafeArea="True">
    
    <ContentPage.Resources>
        <CornerRadius x:Key="DXEditBaseCornerRadius">0</CornerRadius>
        <Thickness x:Key="DXEditBaseBoxPadding">0</Thickness>
        <x:Double x:Key="DXEditBaseBoxMinHeight">41</x:Double>
        <x:Double x:Key="DXEditBaseBorderThickness">0</x:Double>
        <x:Double x:Key="DXEditBaseFocusedBorderThickness">0</x:Double>
        <Color x:Key="DXEditBaseBorderColor">Transparent</Color>
        <Color x:Key="DXEditBaseFocusedBorderColor">Transparent</Color>
        <Color x:Key="DXEditBaseFilledBackgroundColor">Transparent</Color>
        <Color x:Key="DXEditBasePlaceholderColor">#9f9f9f</Color>
        <Color x:Key="DXEditBaseTextColor">#545454</Color>
        <dxe:IconVisibility x:Key="DXTextEditBaseClearIconVisibility">Never</dxe:IconVisibility>
    </ContentPage.Resources>
    
    <dxdf:DataFormView IsEditorLabelVisible="False"
                       ContentPadding="12,0"                   
                       GroupHeaderPadding="2,8"
                       GroupHeaderBackgroundColor="#e6e6e6"
                       GroupHeaderTextColor="#000000"
                       AllowCollapseGroups="False"
                       RowSeparatorColor="#aaaaaa"
                       RowSeparatorThickness="1"
                       IsLastRowSeparatorVisible="False"/>
    </ContentPage>
    

    View Example

See Also