DxToolbarDataMappingBase.Alignment Property
Specifies an item’s alignment. Map this property to a data source field.
Namespace: DevExpress.Blazor.Base
Assembly: DevExpress.Blazor.v26.1.dll
Declaration
[DefaultValue(null)]
[Parameter]
public string Alignment { get; set; }
Property Value
| Type | Default | Description |
|---|---|---|
| String | null | The field name. |
Remarks
The Toolbar stretches to the container width. Assign the name of a data source field that contains ToolbarItemAlignment values to this property to position toolbar items relative to the container boundaries.
The following code snippet maps the Alignment field from the data source to the toolbar item’s position:
<DxToolbar Data="@Data">
<DataMappings>
<DxToolbarDataMapping Text="Text"
Alignment="Alignment" />
</DataMappings>
</DxToolbar>
@code {
List<ToolbarDataItem> Data = new() {
new() {
Text = "New",
Alignment = ToolbarItemAlignment.Left
},
new() {
Text = "Export",
Alignment = ToolbarItemAlignment.Right
}
};
}
See Also