본문 바로가기

Programing (프로그래밍)/WPF & C# (C Sharp)

WPF & C# - Label 이나 RadioButton 에 언더라인(밑줄) 표시를 할경우 / 표시가 안되는 이유 ( 언더바 / 액세스키 / RecognizesAccessKey )

728x90
반응형


 WPF & C# - Label 이나 RadioButton 사용 시 언더라인(밑줄) 표시를 할경우 / 표시가 안되는 이유 ( 언더바 / 액세스키 / RecognizesAccessKey )


질문페이지 : http://www.hoons.net/Board/qacshap/Content/101211


label.Content 첫째줄에 언더바 표시가 안나와요.


결과가 뭔가 이상하죠?

lbl = 첫째줄에 언더바 표시가 안됨
lbl2 = 둘째줄에 언더바 표시가 안됨
lbl3 = 첫째줄에 언더바가 3개아닌 1개로 표시됨
lbl4 = 첫째줄 언더바 표시 안되고, 둘째줄 언더바 1개로 표시됨

설마... MS 버그???

아니겠죠? 뭔가... 저만 모르는 이유가 있겠죠?
고수님들 알려주세요~ ㅠㅠ

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
lbl.Content = "int_int" + "\n";
lbl.Content += "string_string" + "\n";
lbl.Content += "bool_bool" + "\n";
lbl.Content += "string_string" + "\n\n";
 
lbl2.Content = "int__int" + "\n";
lbl2.Content += "string_string" + "\n";
lbl2.Content += "bool_bool" + "\n";
lbl2.Content += "string_string" + "\n";
 
lbl3.Content = "int___int" + "\n";
lbl3.Content += "string_string" + "\n";
lbl3.Content += "bool_bool" + "\n";
lbl3.Content += "string_string" + "\n";
 
lbl4.Content = "int_int" + "\n";
lbl4.Content += "string__string" + "\n";
lbl4.Content += "bool_bool" + "\n";
lbl4.Content += "string_string" + "\n";
cs



[롬메달님 의 답변 링크]


출처 : https://stackoverflow.com/questions/9684619/label-doesnt-display-character


원문

In WPF there is an attribute called RecognizesAccessKey, try to change it to false. If you use RadioButton be aware that there is also label behind, and in the RadioButton template to disable access key recognition you must set RecognizesAccessKey="False" on template ContentPresenter. Then this is disabled, or label is replaced with something else I don't remember now.


구글번역

WPF에는 RecognizesAccessKey 라는 속성이 있으며 이를 false로 변경하십시오. 당신의 RadioButton을 사용하는 경우도 뒤에이 레이블 것을 인식하고, 액세스 키 인식을 비활성화 할 RadioButton 구성 템플릿에 당신은 설정해야합니다 RecognizesAccessKey="False"템플릿 ContentPresenter. 그렇다면 이것은 사용할 수 없거나, 레이블은 내가 기억하지 못하는 다른 것으로 대체됩니다.


728x90
반응형

'Programing (프로그래밍) > WPF & C# (C Sharp)' 카테고리의 다른 글

WPF & C# - 이미지 파일 여러 형식으로 불러오기 ( string / 주소 / uri / jpg / jpeg / png / bmp / System.Drawing.Image / System.Windows.Media.Imaging.BitmapImage / System.Windows.Controls.Image )  (0) 2018.07.24
WPF & C# - OpenFileDialog 파일열기 - 상세 ( 파일오픈 / 오픈다이얼로그 / CustomPlaces / InitialDirectory / Path / 폴더 / folder / Filter / 필터 / 확장자 / 위치 지정 / ofdlg / CheckFileExists / FileOk / ShowDialog )  (1) 2018.07.24
WPF & C# - WindowStyle.None + Resize 꼭! 주의하자 ( WindowStyle.None / 윈도우 / Window / 반투명 / CanResize / ActualWidth / ActualHeight / 리사이즈 / 사이즈 / 전체화면 / 최대화 / 풀스크린 / FullScreen )  (0) 2018.07.23
WPF & C# - 버튼을 라디오 버튼처럼 쓰기 ( RadioButton / Btn / Button / GroupButton / 그룹버튼 / 그룹 )  (2) 2018.07.19
WPF & C# - List<string> list = new List<string>() ( BinarySearch / 중요 / Sort / 정렬 / 이진트리검색 )  (0) 2018.07.06
WPF & C# - Dictionary 딕셔너리 사용법 ( 딕셔너리 / Int / String / Colors / 매칭변수 / key Value)  (0) 2018.07.05
WPF & C# - 간단하게 Loading 표현하기 ( 로딩 이미지 / 대기중 / 이미지 / 로테이션 / rotatetion / 회전 / 더블애니메이션 / DoubleAnimation )  (2) 2018.07.05
WPF & C# - 중복실행방지 2가지 방법 ( 이중실행 / Titile명 기준 / 뮤택스 / 뮤텍스 / Mutex )  (0) 2018.07.04