2013-07-13 1 views
0

WinRTRichEditBoxForegroundColor은 기본값으로 Black입니다.메트로 앱 RichEditBox 기본 전경색

어떻게 이것을 맞춤 컬러로 변경할 수 있습니까?

이것은 내가 뭘하려 ...

// Set default ForegroundColor 
ITextCharacterFormat defaultCharacterFormat = 
    redBody.Document.GetDefaultCharacterFormat(); 

defaultCharacterFormat.ForegroundColor = Colors.Blue; 

redBody.Document.SetDefaultCharacterFormat(defaultCharacterFormat); 
redBody.Document.ApplyDisplayUpdates(); 

이 작업을하는 방법에 어떤 아이디어?

답변

1

XAML RichEditBox을 사용하는 경우 Foreground 속성이 효과적입니다. 예 : <RichEditBox Foreground="Violet" />.

+0

나는 지금 정말로 어리 석다. 때로는 가장 분명한 해결책이 우리의 마음을 어지럽게 만드는 방법을 놀라워합니다. – c0D3l0g1c

+0

솔루션이 간단하고 간결 할 때 좋습니다. :) –