Back to Devexpress

DxButtonGroupItem.Target Property

blazor-devexpress-dot-blazor-dot-dxbuttongroupitem-cb4e290f.md

latest2.2 KB
Original Source

DxButtonGroupItem.Target Property

Specifies the target attribute’s value for the button group item.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
[DefaultValue(null)]
[Parameter]
public string Target { get; set; }

Property Value

TypeDefaultDescription
Stringnull

The target attribute’s value.

|

Remarks

Use the NavigateUrl property to specify a URL to which the web browser navigates when the button group item is clicked. To specify where the browser should open the URL (same tab or new tab), use the Target property.

Refer to the MDN documentation for available Target property values (_self, _blank, etc.): target. If you do not specify the Target property value explicitly, the component applies the _self value and opens the specified URL in the same tab.

Example

The following code snippet opens the Blazor Documentation item’s NavigateUrl link in the same tab and the Blazor Demos item’s link in a new tab:

razor
<DxButtonGroup RenderStyle="ButtonRenderStyle.Secondary">
    <Items>
        <DxButtonGroupItem Text="Blazor Documentation"
                           NavigateUrl="https://docs.devexpress.com/Blazor/400725/blazor-components"
                           Target="_blank"/>
        <DxButtonGroupItem Text="Blazor Demos"
                           NavigateUrl="https://demos.devexpress.com/blazor/"
                           Target="_blank" />
    </Items>
</DxButtonGroup>

See Also

DxButtonGroupItem Class

DxButtonGroupItem Members

DevExpress.Blazor Namespace