TextBlock.Text 속성
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
의 텍스트 내용을 TextBlock가져오거나 설정합니다.
public:
property System::String ^ Text { System::String ^ get(); void set(System::String ^ value); };
[System.Windows.Localizability(System.Windows.LocalizationCategory.Text)]
public string Text { get; set; }
[<System.Windows.Localizability(System.Windows.LocalizationCategory.Text)>]
member this.Text : string with get, set
Public Property Text As String
속성 값
의 TextBlock텍스트 내용입니다. 텍스트가 아닌 모든 콘텐츠가 제거되어 내용의 일반 텍스트 표현이 TextBlock 발생합니다. 기본값은 Empty입니다.
- 특성
예제
다음 예제에서는 요소의 TextBlock 특성을 설정하는 Text 방법을 보여줍니다.
<TextBlock Text="The text contents of this TextBlock element."/>
또는 텍스트 실행의 내용이 요소 태그로 TextBlock 만 포함될 수 있습니다.
다음 예제에서는 설정 하는 방법의 Typography 속성 프로그래밍 방식으로 합니다.
TextBlock textBlock = new TextBlock();
textBlock.Text = "The text contents of this TextBlock.";
Dim textBlock As New TextBlock()
textBlock.Text = "The text contents of this TextBlock."
설명
에 일반 텍스트를 TextBlock표시하려는 경우 이 속성을 사용합니다. 텍스트의 서식을 지정해야 하는 경우 속성에 개체를 Inlines 추가 Inline 합니다.
종속성 속성 정보
| Item | 가치 |
|---|---|
| 식별자 필드 | TextProperty |
메타데이터 속성이 다음으로 설정됩니다. true |
AffectsMeasure, AffectsRender |