Skip to main content
All docs
V24.2

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

LegendBaseSettings<TComponent, TModel>.PaddingTopBottom Property

Specifies the padding between the top or bottom legend edge and legend content.

Namespace: DevExpress.Blazor.Base

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
[DefaultValue(10)]
[Parameter]
public int PaddingTopBottom { get; set; }

#Property Value

Type Default Description
Int32 10

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