Back to Devexpress

LegendBaseSettings<TComponent, TModel>.PaddingLeftRight Property

blazor-devexpress-dot-blazor-dot-base-dot-legendbasesettings-2-2c13efd6.md

latest1.8 KB
Original Source

LegendBaseSettings<TComponent, TModel>.PaddingLeftRight Property

Specifies the padding between the left or right legend edge and legend content.

Namespace : DevExpress.Blazor.Base

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
[DefaultValue(10)]
[Parameter]
public int PaddingLeftRight { get; set; }

Property Value

TypeDefaultDescription
Int3210

The padding in pixels.

|

Remarks

Use the PaddingLeftRight or PaddingTopBottom property to add or remove empty space around legend content.

Example

The following code snippet removes paddings between legend edges and content in the DxBarGauge component:

razor
<DxBarGauge Width="50%"
            Height="500px"
            StartValue="0"
            EndValue="100"
            Values="@Values">
    <DxBarGaugeLegendSettings Visible="true"
                              ItemCaptions="@LegendItemCaptions"
                              PaddingLeftRight="0"
                              PaddingTopBottom="0"/>
    @* ...*@
</DxBarGauge>

@code {
    double[] Values = new double[] { 47.27, 65.32, 84.59, 81.86, 99 };
    string[] LegendItemCaptions = new string[] { "Metacritic", "Ratingraph.com", "Rotten Tomatoes", "IMDb", "TV.com" };
}

See Also

LegendBaseSettings<TComponent, TModel> Class

LegendBaseSettings<TComponent, TModel> Members

DevExpress.Blazor.Base Namespace