- 
                                            
                                            [WPF] '_' 문자가 출력되지 않는 경우! (Underline, Underscore)Microsoft .NET/WPF 2019. 7. 3. 19:25보통 Element에 Text형식으로 문자가 들어가게 되면 문제가 안 생기지만 Content형식으로 문자를 넣게 되면 '_' 문자가 정상적으로 출력되지 않는 경우가 있습니다. 그런 경우 '_'문자가 accessKey로 분류되어 처리되었을 확률이 높습니다. 이런 경우 '_' 문자를 "__"문자처럼 '_'를 하나 더 붙여주면 해결됩니다.  <Window x:Class="WPF_Underscore.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" Title="WPF_Underscore" Height="300" Width="300"> <Button Width="100" Height="100" Content="_TEST __TEST"/> </Window>_TEST 문자열은 accessKey로 분류되어 TEST로 출력되고 두번째 __TEST는 원하는 결과값인 _TEST로 정상적으로 출력됨. 'Microsoft .NET > WPF' 카테고리의 다른 글[WPF] 지역화 (다중 언어) (0) 2020.12.07 [WPF] LiveCharts.WPF를 이용한 차트 그리기 (In xaml / In code) (0) 2020.01.07 [WPF] Timer ( DispatcherTimer ) (0) 2019.07.03 [WPF] ListView (0) 2019.05.13 [WPF] 1. 화면 구성 - WrapPanel (0) 2019.02.27