일부 레거시 코드에서 제공하는 System.Drawing.Font 개체를 사용하여 모양을 변경하려고하는 WPF Label 컨트롤이 있습니다. 나는 대부분의 속성을 설정할 수 있었지만, Strikeout과 Underline으로 어려움을 겪고있다.WPF 레이블로 System.Drawing.Font 사용
지금까지 내가 가진 :
System.Drawing.Font font = FontFromLegacyCode();
System.Windows.Controls.Label label = new System.Windows.Controls.Label();
label.FontFamily = new System.Windows.Media.FontFamily(font.Name);
label.FontWeight = font.Bold ? System.Windows.FontWeights.Bold : System.Windows.FontWeights.Regular;
label.FontStyle = font.Italic ? System.Windows.FontStyles.Italic : System.Windows.FontStyles.Normal;
label.FontSize = font.Size;
어떻게 글꼴 삼진을 설정 또는 속성을 강조합니까? 더 나은 컨트롤을 사용할 수 있습니까?
완벽하게하십시오. 처음에는 TextBlock을 사용해야했습니다. – bstoney