blazor

· C#
안녕하세요!오늘은 Css에 조건을 걸어서 사용해 보겠습니다 ....@code { private string GetCssClass() { return 조건(ex > v_string == "babo") ? "color1" : "color2"; }}  메소드를 만들어 조건과 삼향연산자를 이용하여 true : false를 구분 하여 밑에 해당되는 css를 적용하는 방법입니다. 추가적으로 질문은 댓글로 남겨주시면 답변을 드리겠습니다.
· C#
안녕하세요! 오늘은 Blazor 컴포넌트 간 데이터 받는 방법에 대해서 알아 볼거에요 ! @code { TestComponent test;} 코드 부분에 사용할 컴포넌트를 선언 해주고 위에 "ref"를 넣어 주면 해당 컴포넌트에서 데이터를 가져 올 수 있어요 ! Ex) Test1 컴포넌트/* Test1 컴포넌트 */ @code { TestComponent2 test2 void getMsg() { test2.sendMsg(); }} Test2 컴포넌트 /* Test2 컴포넌트 */@code { [Parameter] public string test1 { get; set; } public void sendMsg() { string Msg = "Test1"; }..
· C#
div로 묶어서 RadioButton 설정  blazor @code{}안에 선언@code{ private string rChecked = "r1"; private string getCssVisibility(string checkedValue, string targetValue) { return checkedValue == targetValue ? "" : "d-none"; }}//d-done은 css을 담을 이름//"r1"은 Chcked된 옵션 blazor 안에 선언 각 RadioButton에 사용 할 div들 선언 //해당 RadioButton의 보여 줄 컴포넌트나 소스 작성 전체 소스 //해당 RadioButton의 보여 줄 컴포넌트나 소스 작성 //..
yunnuda
'blazor' 태그의 글 목록