KeiStory

728x90
반응형

C# RadzenButton ToolTip / Busy indicator 표시하기

 

1. ToolTip

RadzenButton 에서 아래와 같이 버튼에 ToolTip 을 표시하려면

title 속성을 사용하면됩니다.

<RadzenButton Text="Clear selected rows" title="Clear Selection" />

 

아래와 같이 아이콘으로 되어있는 경우 해당 버튼의 기능을 설명할 때 유용하게 사용됩니다.

 

2.Busy indicator

Busy Indicator 는 버튼 클릭 시 사용자의 더블 클릭을 방지하고 진행 중 표시를 하려고 할 때 사용됩니다.

<RadzenButton Icon="play_arrow" title="play" IsBusy=@busy Click=@OnBusyClick />

@code {
    bool busy;

    async Task OnBusyClick()
    {
        busy = true;
        // Use await and Task.Delay to yield execution to Blazor and refresh the UI
        await Task.Delay(2000);
        // Set the busy flag to false after the long task is done
        busy = false;
    }
}

결과

(기본)

(진행중)

728x90

공유하기

facebook twitter kakaoTalk kakaostory naver band